MCPcopy Create free account
hub / github.com/continuedev/continue / getShellCommand

Function getShellCommand

core/tools/implementations/runTerminalCommand.ts:25–37  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

23 }
24} // Simple helper function to use login shell on Unix/macOS and PowerShell on Windows
25function getShellCommand(command: string): { shell: string; args: string[] } {
26 if (process.platform === "win32") {
27 // Windows: Use PowerShell
28 return {
29 shell: "powershell.exe",
30 args: ["-NoLogo", "-ExecutionPolicy", "Bypass", "-Command", command],
31 };
32 } else {
33 // Unix/macOS: Use login shell to source .bashrc/.zshrc etc.
34 const userShell = process.env.SHELL || "/bin/bash";
35 return { shell: userShell, args: ["-l", "-c", command] };
36 }
37}
38
39import { fileURLToPath } from "node:url";
40import { ToolImpl } from ".";

Callers 1

runTerminalCommandImplFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected