Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f017548 commit 40c100cCopy full SHA for 40c100c
agent/usershell/usershell_windows.go
@@ -4,7 +4,11 @@ import "os/exec"
4
5
// Get returns the command prompt binary name.
6
func Get(username string) (string, error) {
7
- _, err := exec.LookPath("powershell.exe")
+ _, err := exec.LookPath("pwsh.exe")
8
+ if err == nil {
9
+ return "pwsh.exe", nil
10
+ }
11
+ _, err = exec.LookPath("powershell.exe")
12
if err == nil {
13
return "powershell.exe", nil
14
}
0 commit comments