(value: string)
| 27 | * @param {String} value. |
| 28 | */ |
| 29 | export function toCommandArgument(value: string): string { |
| 30 | if (!value) { |
| 31 | return value; |
| 32 | } |
| 33 | return value.indexOf(' ') >= 0 && !value.startsWith('"') && !value.endsWith('"') ? `"${value}"` : value.toString(); |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | * Appropriately formats a a file path so it can be used as an argument for a command in a shell. |
no test coverage detected