(value: string)
| 8 | |
| 9 | /** Quote a value for safe interpolation into a bash command line. */ |
| 10 | export function shellQuote(value: string): string { |
| 11 | if (/^[\w@./:=-]+$/.test(value)) { |
| 12 | return value; |
| 13 | } |
| 14 | |
| 15 | return `'${value.replace(/'/g, `'\\''`)}'`; |
| 16 | } |
no outgoing calls
no test coverage detected