(value: string)
| 20 | * unchanged so this function can be called unconditionally. |
| 21 | */ |
| 22 | export function quoteForCmd(value: string): string { |
| 23 | if (process.platform !== 'win32') return value; |
| 24 | if (!value.includes(' ')) return value; |
| 25 | if (value.startsWith('"') && value.endsWith('"')) return value; |
| 26 | return `"${value}"`; |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Determine whether a spawn call needs `shell: true` on Windows. |
no outgoing calls
no test coverage detected