From 238ae8d52e9e549453f872208a1ce4f4cca3e203 Mon Sep 17 00:00:00 2001 From: Yinan Ding Date: Sun, 12 May 2024 18:05:24 -0400 Subject: [PATCH] fix: `.` in `list-bin-paths` was taken as is to form `PATH` `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. --- src/plugins/external_plugin.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/plugins/external_plugin.rs b/src/plugins/external_plugin.rs index e4481beba..e059c566e 100644 --- a/src/plugins/external_plugin.rs +++ b/src/plugins/external_plugin.rs @@ -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()] };