Browse Source

Added better error messaging when workspace.member or workspace.exclude doesn't exist. (#1524)

anant asthana 3 years ago
parent
commit
d2233d6163
1 changed files with 6 additions and 2 deletions
  1. 6 2
      cli/src/config.rs

+ 6 - 2
cli/src/config.rs

@@ -197,7 +197,9 @@ impl WithPath<Config> {
                     .unwrap()
                     .join(m)
                     .canonicalize()
-                    .unwrap()
+                    .unwrap_or_else(|_| {
+                        panic!("Error reading workspace.members. File {:?} does not exist at path {:?}.", m, self.path)
+                    })
             })
             .collect();
         let exclude = self
@@ -210,7 +212,9 @@ impl WithPath<Config> {
                     .unwrap()
                     .join(m)
                     .canonicalize()
-                    .unwrap()
+                    .unwrap_or_else(|_| {
+                        panic!("Error reading workspace.exclude. File {:?} does not exist at path {:?}.", m, self.path)
+                    })
             })
             .collect();
         Ok((members, exclude))