(value: string, platform: NodeJS.Platform = process.platform)
| 29 | } |
| 30 | |
| 31 | export function quoteShellValue(value: string, platform: NodeJS.Platform = process.platform): string { |
| 32 | if (runtimeShellKind(platform) === "powershell") { |
| 33 | return `'${value.replace(/'/g, "''")}'`; |
| 34 | } |
| 35 | return `'${value.replace(/'/g, `'\\''`)}'`; |
| 36 | } |
| 37 | |
| 38 | export function shellCommandInvocation(commandText: string, platform: NodeJS.Platform = process.platform): { |
| 39 | command: string; |