( command: string | string[] | null | undefined, )
| 19 | } |
| 20 | |
| 21 | export function formatCommand( |
| 22 | command: string | string[] | null | undefined, |
| 23 | ): string { |
| 24 | if (Array.isArray(command)) { |
| 25 | return command.map((part) => quoteArg(part)).join(" "); |
| 26 | } |
| 27 | if (typeof command === "string") { |
| 28 | return command.trim(); |
| 29 | } |
| 30 | return ""; |
| 31 | } |
| 32 | |
| 33 | function wrapShellCommand(command: string): string { |
| 34 | const script = command.trim(); |
no test coverage detected