Skip to content

Commit 0c6afc3

Browse files
committed
Fix duplicated PATH entries
1 parent e3e5cc2 commit 0c6afc3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/env_var.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ pub fn prepend_path(name: &str, value: Vec<PathBuf>, cmd: &mut Command) {
2727
if let Some(ref v) = old_value {
2828
parts = value;
2929
parts.extend(env::split_paths(v).collect::<Vec<_>>());
30+
parts.sort();
31+
parts.dedup();
3032
} else {
3133
parts = value;
3234
}

0 commit comments

Comments
 (0)