Skip to content

Commit

Permalink
fix: . in list-bin-paths was taken as is to form PATH (#2077)
Browse files Browse the repository at this point in the history
`PATH` generated from this was like `/Users/user/.local/share/mise/installs/dotnet/8.0.204/.:/Users/user/.local/share/mise/installs/dotnet/8.0.204/shared:other-stuff...` which lead to executable not found.
Now with the fix, the `PATH` becomes `/Users/user/.local/share/mise/installs/dotnet/8.0.204/:/Users/user/.local/share/mise/installs/dotnet/8.0.204/shared:other-stuff...`, and the executable can be found.
  • Loading branch information
FranklinYinanDing authored May 12, 2024
1 parent ced564a commit a88fee8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/plugins/external_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,16 @@ impl ExternalPlugin {
// }
// }
let output = sm.cmd(&Script::ListBinPaths).read()?;
output.split_whitespace().map(|f| f.to_string()).collect()
output
.split_whitespace()
.map(|f| {
if f == "." {
String::new()
} else {
f.to_string()
}
})
.collect()
} else {
vec!["bin".into()]
};
Expand Down

0 comments on commit a88fee8

Please sign in to comment.