53
return Promise.resolve(true);
54
}
56
>
const enum ShellType { cmd, powershell, bash }
57
>
58
>
59
>
export function prepareCommand(shell: string, args: string[], argsCanBeInterpretedByShell: boolean, cwd?: string, env?: { [key: string]: string | null }): string {
60
>
61
>
shell = shell.trim().toLowerCase();
62
>
63
>
// try to determine the shell type
64
>
let shellType;
65
>
if (shell.indexOf('powershell') >= 0 || shell.indexOf('pwsh') >= 0) {
66
shellType = ShellType.powershell;
67
>
} else if (shell.indexOf('cmd.exe') >= 0) {
terminals.ts
68
shellType = ShellType.cmd;
69
} else if (shell.indexOf('bash') >= 0) {