Skip to content

Commit

Permalink
fix error (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmoulton authored Aug 18, 2024
1 parent 6e74e43 commit 23e0e01
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,18 @@ impl Config {
.iter()
.map(|search_dir| {
let expanded_path = shellexpand::full(&search_dir.path.to_string_lossy())
.change_context(ConfigError::IoError)
.unwrap()
.change_context(ConfigError::IoError)?
.to_string();

let path = canonicalize(expanded_path)
.change_context(ConfigError::IoError)
.unwrap();
.change_context(ConfigError::IoError)?;

SearchDirectory::new(path, search_dir.depth)
Ok(SearchDirectory::new(path, search_dir.depth))
})
.collect()
.collect::<Result<_>>()
} else {
Vec::new()
};
Ok(Vec::new())
}?;

// merge old search paths with new search directories
if let Some(search_paths) = self.search_paths.as_ref() {
Expand Down

0 comments on commit 23e0e01

Please sign in to comment.