Skip to content

Commit 0fef980

Browse files
author
Andrew
committed
style fix 1
1 parent 4539986 commit 0fef980

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,8 @@ impl CommandDiscovery {
111111
paths.append(&mut env::split_paths(&value).collect::<Vec<_>>());
112112
} else {
113113
for p in resource_path_setting.directories {
114-
if let Ok(v) = PathBuf::from_str(&p) {
115-
paths.push(v);
116-
} else {
117-
trace!("Can't parse path: '{p}'");
118-
};
114+
let Ok(v) = PathBuf::from_str(&p) else { return Err(DscError::Operation("Can't parse '{p}'".to_string()));};
115+
paths.push(v);
119116
}
120117

121118
if resource_path_setting.append_env_path {

0 commit comments

Comments
 (0)