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

@ -376,7 +376,19 @@ impl TerminalBuilder {
let pty_options = {
let alac_shell = match shell.clone() {
Shell::System => None,
Shell::System => {
#[cfg(target_os = "windows")]
{
Some(alacritty_terminal::tty::Shell::new(
util::retrieve_system_shell(),
Vec::new(),
))
}
#[cfg(not(target_os = "windows"))]
{
None
}
}
Shell::Program(program) => {
Some(alacritty_terminal::tty::Shell::new(program, Vec::new()))
}