Skip to content

Commit 15f8111

Browse files
author
Andrew
committed
code 2
1 parent 6eb2d05 commit 15f8111

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ impl CommandDiscovery {
6666
if !using_custom_path {
6767
if let Some(exe_home) = env::current_exe()?.parent() {
6868
let exe_home_pb = exe_home.to_path_buf();
69-
if !paths.contains(&exe_home_pb) {
69+
if paths.contains(&exe_home_pb) {
70+
trace!("Exe home is already in path: {}", exe_home.to_string_lossy());
71+
} else {
7072
trace!("Adding exe home to path: {}", exe_home.to_string_lossy());
7173
paths.push(exe_home_pb);
7274

7375
if let Ok(new_path) = env::join_paths(paths.clone()) {
7476
debug!("Using PATH: {:?}", new_path.to_string_lossy());
7577
env::set_var("PATH", &new_path);
7678
}
77-
} else {
78-
trace!("Exe home is already in path: {}", exe_home.to_string_lossy());
7979
}
8080
}
8181
};

0 commit comments

Comments
 (0)