windows: Detect pwsh (#25713)

Closes #22015


Release Notes:

- N/A
This commit is contained in:
张小白 2025-03-25 13:31:11 +08:00 committed by GitHub
parent fca7ce9a14
commit b85492bd00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 118 additions and 2 deletions

View file

@ -434,8 +434,10 @@ impl ShellBuilder {
// `alacritty_terminal` uses this as default on Windows. See:
// https://github.com/alacritty/alacritty/blob/0d4ab7bca43213d96ddfe40048fc0f922543c6f8/alacritty_terminal/src/tty/windows/mod.rs#L130
// We could use `util::retrieve_system_shell()` here, but we are running tasks here, so leave it to `powershell.exe`
// should be okay.
fn system_shell() -> String {
"powershell".to_owned()
"powershell.exe".to_string()
}
fn to_windows_shell_variable(&self, input: String) -> String {