(
command: string,
args: string[],
options: {
env?: Record<string, string>
cwd?: string
} = {}
)
| 183 | } |
| 184 | |
| 185 | export function command( |
| 186 | command: string, |
| 187 | args: string[], |
| 188 | options: { |
| 189 | env?: Record<string, string> |
| 190 | cwd?: string |
| 191 | } = {} |
| 192 | ): Command { |
| 193 | const process = spawn(command, args, { |
| 194 | shell: true, |
| 195 | ...options, |
| 196 | stdio: [class="st">'ignore', class="st">'pipe', class="st">'pipe'], |
| 197 | }) |
| 198 | if (shellOutput) { |
| 199 | console.log( |
| 200 | `[SHELL] ${command} ${args.join(class="st">' ')} ${JSON.stringify(options)}` |
| 201 | ) |
| 202 | } |
| 203 | return new CommandImpl(process) |
| 204 | } |
no test coverage detected