(value: ShellValue)
| 54 | } |
| 55 | |
| 56 | function interpolate(value: ShellValue): string { |
| 57 | if (isRaw(value)) return value.raw; |
| 58 | if (Array.isArray(value)) { |
| 59 | return (value as ReadonlyArray<string | number>) |
| 60 | .map((item) => shellQuote(String(item))) |
| 61 | .join(" "); |
| 62 | } |
| 63 | return shellQuote(String(value)); |
| 64 | } |
| 65 | |
| 66 | // Guard against `exec` being called as a tagged template. `exec` |
| 67 | // takes a plain command string, and over Workers RPC that string is |
no test coverage detected