(command: unknown)
| 77 | // indexed array shape survives. Either way the unsafe path fails |
| 78 | // loudly and points at the fix. |
| 79 | export function assertNotTemplate(command: unknown): asserts command is string { |
| 80 | if (Array.isArray(command)) { |
| 81 | throw new TypeError( |
| 82 | "The remote stub's exec() does not take a tagged template. Reach the " + |
| 83 | "Workspace through getWorkspace(stub) and call exec as a template there, " + |
| 84 | "or wrap the command in the sh tag so interpolated values are escaped " + |
| 85 | "before the command crosses the RPC boundary.", |
| 86 | ); |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | // Tagged template that builds a shell command string with every |
| 91 | // interpolated value escaped. The static template parts come from |
no outgoing calls
no test coverage detected