( shell: ShellPlan, command: string, env: NodeJS.ProcessEnv = process.env, )
| 138 | } |
| 139 | |
| 140 | export function buildShellSpawnPlan( |
| 141 | shell: ShellPlan, |
| 142 | command: string, |
| 143 | env: NodeJS.ProcessEnv = process.env, |
| 144 | ): ShellSpawnPlan { |
| 145 | if ((shell.kind === 'pwsh' || shell.kind === 'powershell') && shell.exe) { |
| 146 | const wrapped = buildPowerShellCommand(command, env); |
| 147 | return { |
| 148 | file: shell.exe, |
| 149 | args: ['-NoLogo', '-NoProfile', '-NonInteractive', '-Command', wrapped.script], |
| 150 | useShellOption: false, |
| 151 | env: wrapped.env, |
| 152 | }; |
| 153 | } |
| 154 | return { file: command, args: [], useShellOption: true }; |
| 155 | } |
| 156 | |
| 157 | export function buildPtyShellSpawnPlan( |
| 158 | shell: ShellPlan, |
no test coverage detected