shell: Correctly identifiy powershell shells on windows (#43526)

Release Notes:

- Fixed zed only finding pwsh but not powershell on windows
This commit is contained in:
Lukas Wirth
2025-11-26 08:00:46 +00:00
committed by GitHub
parent 9d8b5077b4
commit 00e93bfa11
3 changed files with 23 additions and 13 deletions
+6 -5
View File
@@ -389,11 +389,12 @@ impl Platform for WindowsPlatform {
#[allow(
clippy::disallowed_methods,
reason = "We are restarting ourselves, using std command thus is fine"
)]
let restart_process = util::command::new_std_command("powershell.exe")
.arg("-command")
.arg(script)
.spawn();
)] // todo(shell): There might be no powershell on the system
let restart_process =
util::command::new_std_command(util::shell::get_windows_system_shell())
.arg("-command")
.arg(script)
.spawn();
match restart_process {
Ok(_) => self.quit(),