Skip to content

Commit

Permalink
fix: . in list-bin-paths was taken as is to form PATH
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 committed May 12, 2024
1 parent 99f9454 commit 238ae8d
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 238ae8d

Please sign in to comment.