Browse Source

cli: Make sure program_paths only includes directories. (#887)

Alan O'Donnell 4 years ago
parent
commit
d3f78bb735
1 changed files with 1 additions and 0 deletions
  1. 1 0
      cli/src/config.rs

+ 1 - 0
cli/src/config.rs

@@ -124,6 +124,7 @@ impl WithPath<Config> {
             if members.is_empty() {
                 let path = self.path().parent().unwrap().join("programs");
                 fs::read_dir(path)?
+                    .filter(|entry| entry.as_ref().map(|e| e.path().is_dir()).unwrap_or(false))
                     .map(|dir| dir.map(|d| d.path().canonicalize().unwrap()))
                     .collect::<Vec<Result<PathBuf, std::io::Error>>>()
                     .into_iter()