windows: Detect pwsh (#25713)

Closes #22015


Release Notes:

- N/A
This commit is contained in:
张小白
2025-03-24 22:31:11 -07:00
committed by GitHub
parent fca7ce9a14
commit b85492bd00
3 changed files with 118 additions and 2 deletions
+13 -1
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()))
}