src\main.rs
3118 │ fn detect_shell() -> CommandBuilder {
3119 │ let pwsh = which::which("pwsh").ok().map(|p| p.to_string_lossy().into_owned());
3120 │ let cmd = which::which("cmd").ok().map(|p| p.to_string_lossy().into_owned());
3121 │ match pwsh.or(cmd) {
3122 │ Some(path) => CommandBuilder::new(path),
3123 │ None => CommandBuilder::new("pwsh.exe"),
3124 │ }
3125 │ }
detect_shell only check and use pwsh or cmd, doesn't check powershell.
Get-Command powershell
CommandType Name Version Source
----------- ---- ------- ------
Application powershell.exe 10.0.26... C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe
temporary fix method
# install pwsh 7+
winget install --id Microsoft.PowerShell
may be should add powershell into detect_shell check sequence.
src\main.rs
detect_shellonly check and usepwshorcmd, doesn't checkpowershell.temporary fix method
# install pwsh 7+ winget install --id Microsoft.PowerShellmay be should add
powershellinto detect_shell check sequence.