Skip to content

Commit c098423

Browse files
committed
fix build break
1 parent 1175d31 commit c098423

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,12 @@ impl CommandDiscovery {
126126
let mut paths: Vec<PathBuf> = vec![];
127127

128128
let dsc_resource_path = env::var_os("DSC_RESOURCE_PATH");
129-
if resource_path_setting.allow_env_override && dsc_resource_path.is_some(){
130-
let value = dsc_resource_path.unwrap();
131-
debug!("DSC_RESOURCE_PATH: {:?}", value.to_string_lossy());
132-
using_custom_path = true;
133-
paths.append(&mut env::split_paths(&value).collect::<Vec<_>>());
129+
if resource_path_setting.allow_env_override {
130+
if let Some(value) = dsc_resource_path {
131+
debug!("DSC_RESOURCE_PATH: {:?}", value.to_string_lossy());
132+
using_custom_path = true;
133+
paths.append(&mut env::split_paths(&value).collect::<Vec<_>>());
134+
}
134135
} else {
135136
for p in resource_path_setting.directories {
136137
let v = PathBuf::from_str(&p);

0 commit comments

Comments
 (0)