You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Windows Shell falls back to cmd.exe when launched from PowerShell 7 (pwsh.exe) #750
When cecli is launched from PowerShell 7 (pwsh.exe) on Windows, Shell commands fall back to cmd.exe (shell=True) instead of PowerShell, causing PowerShell cmdlets (Get-ChildItem, Get-Content, ls, etc.) to fail.
Root Cause
In cecli/run_cmd.py, get_windows_parent_process_name() walks up the process tree looking only for "powershell.exe" (Windows PowerShell 5.1) and "cmd.exe". It misses "pwsh.exe" (PowerShell 7), so it returns None and both run_cmd_subprocess and run_cmd_async fall back to cmd.exe.
Expected Behavior
Detect pwsh.exe in get_windows_parent_process_name() and route commands through pwsh -NoProfile -NonInteractive -OutputFormat Text -EncodedCommand ... just as powershell.exe routes through powershell.
Activity
Merge pull request #749 from philippeback/fix/windows-pwsh-detection