mirror of
https://github.com/coder/coder.git
synced 2025-07-30 22:19:53 +00:00
feat(windows): default to PowerShell v7 over v6 and fallback to cmd.exe (#5053)
This commit is contained in:
@@ -4,7 +4,11 @@ import "os/exec"
|
||||
|
||||
// Get returns the command prompt binary name.
|
||||
func Get(username string) (string, error) {
|
||||
_, err := exec.LookPath("powershell.exe")
|
||||
_, err := exec.LookPath("pwsh.exe")
|
||||
if err == nil {
|
||||
return "pwsh.exe", nil
|
||||
}
|
||||
_, err = exec.LookPath("powershell.exe")
|
||||
if err == nil {
|
||||
return "powershell.exe", nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user