(command: string)
| 23 | } |
| 24 | } // Simple helper function to use login shell on Unix/macOS and PowerShell on Windows |
| 25 | function 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 | |
| 39 | import { fileURLToPath } from "node:url"; |
| 40 | import { ToolImpl } from "."; |
no outgoing calls
no test coverage detected