colours and formatting fixes

This commit is contained in:
aaron-jack-manning
2022-08-29 19:38:21 +10:00
parent c547fb8997
commit 93fa52611a
9 changed files with 240 additions and 155 deletions

View File

@@ -68,10 +68,10 @@ pub fn connect(name : String, path : path::PathBuf, config : &mut config::Config
if path.exists() && path.is_dir() {
// Vault is missing required metadata files.
if !path.join("notes").exists() {
Err(error::Error::Generic(format!("Cannot connect the vault as it is missing the {} folder", colour::file("notes"))))
Err(error::Error::Generic(format!("Cannot connect the vault as it is missing the {} folder", colour::text::file("notes"))))
}
else if !path.join("state.toml").exists() {
Err(error::Error::Generic(format!("Cannot connect the vault as it is missing the {} file", colour::file("state.toml"))))
Err(error::Error::Generic(format!("Cannot connect the vault as it is missing the {} file", colour::text::file("state.toml"))))
}
// Required metadata exists, so the vault is connected.
else {