From 07c144fef414a24622a519665e8c4788fa05fbe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Katona?= Date: Fri, 15 Jul 2022 20:49:34 -0700 Subject: [PATCH] clarify errors --- src/vcs.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vcs.rs b/src/vcs.rs index aea32ff..44bd642 100644 --- a/src/vcs.rs +++ b/src/vcs.rs @@ -103,7 +103,11 @@ impl Vcs { format!("{}", self.work_dir.display()).italic(), ); } else { - println!("{}", "Mismatching projects and profiles".with(ERROR_COLOR)); + if self.profiles.is_empty() { + println!("{}", "No profiles defined, use 'cargo vcs save' to generate one".with(ERROR_COLOR)); + } else { + println!("{}", "Mismatching projects and profiles".with(ERROR_COLOR)); + } self.list(); } @@ -318,7 +322,7 @@ impl Vcs { } else { path = path .parent() - .ok_or_else(|| Error::input_error("Workspace not found", path_str))?; + .ok_or_else(|| Error::input_error("No workspace found", path_str))?; } } }