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
// Use ComSpec if available, otherwise default to cmd.exe
73
+
ifcomspec:=os.Getenv("ComSpec"); comspec!="" {
74
+
shell=comspec
75
+
} else {
76
+
shell="cmd.exe"
77
+
}
78
+
argsPrefix= []string{"/C"}
79
+
}
80
+
} else {
81
+
// Unix-like: use SHELL or default to /bin/sh
82
+
shell=os.Getenv("SHELL")
83
+
ifshell=="" {
84
+
shell="/bin/sh"
85
+
}
86
+
argsPrefix= []string{"-c"}
58
87
}
59
88
60
89
return&ShellTool{
61
90
handler: &shellHandler{
62
-
shell: shell,
91
+
shell: shell,
92
+
shellArgsPrefix: argsPrefix,
63
93
},
64
94
}
65
95
}
@@ -71,7 +101,7 @@ Execute shell commands in the user's environment with full control over working
71
101
72
102
## Core Concepts
73
103
74
-
**Execution Context**: Commands run in the user's default shell (${SHELL}) with access to all environment variables and the current workspace.
104
+
**Execution Context**: Commands run in the user's default shell with access to all environment variables and the current workspace. On Windows, PowerShell (pwsh/powershell) is used when available; otherwise, cmd.exe is used. On Unix-like systems, ${SHELL} is used or /bin/sh as fallback.
0 commit comments