diff --git a/crates/util/src/shell.rs b/crates/util/src/shell.rs index 28affde71674e93c78ce2cb65648eb27dfe11819..ba54f7b7784b45613b28067afe2748339e6b6c64 100644 --- a/crates/util/src/shell.rs +++ b/crates/util/src/shell.rs @@ -199,7 +199,11 @@ pub fn get_windows_system_shell() -> String { .or_else(|| find_pwsh_in_programfiles(true, true)) .or_else(find_pwsh_in_scoop) .map(|p| p.to_string_lossy().into_owned()) - .unwrap_or("powershell.exe".to_string()) + .inspect(|shell| log::info!("Found powershell in: {}", shell)) + .unwrap_or_else(|| { + log::warn!("Powershell not found, falling back to `cmd`"); + "cmd.exe".to_string() + }) }); (*SYSTEM_SHELL).clone() diff --git a/crates/util/src/shell_env.rs b/crates/util/src/shell_env.rs index 460346f6143d5c80fea0a5ca3dbc5ddaabd24e29..1b4d32851a2b07cd088457bc7a16b0db72f7a611 100644 --- a/crates/util/src/shell_env.rs +++ b/crates/util/src/shell_env.rs @@ -208,7 +208,6 @@ async fn capture_windows( String::from_utf8_lossy(&output.stdout), String::from_utf8_lossy(&output.stderr), ); - // "cmd" "/c" "cd \'C:\\Workspace\\salsa\\\'; \'C:\\Workspace\\zed\\zed\\target\\debug\\zed.exe\' --printenv" let env_output = String::from_utf8_lossy(&output.stdout); // Parse the JSON output from zed --printenv