Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40c100c

Browse files
committed
feat(windows): default to PowerShell v7 over v6 and fallback to cmd.exe
1 parentf017548 commit40c100c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎agent/usershell/usershell_windows.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import "os/exec"
44

55
// Get returns the command prompt binary name.
66
funcGet(usernamestring) (string,error) {
7-
_,err:=exec.LookPath("powershell.exe")
7+
_,err:=exec.LookPath("pwsh.exe")
8+
iferr==nil {
9+
return"pwsh.exe",nil
10+
}
11+
_,err=exec.LookPath("powershell.exe")
812
iferr==nil {
913
return"powershell.exe",nil
1014
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp