( fsPath: string, args: string[] = [], spawnOpts?: SpawnOptions )
| 283 | } |
| 284 | |
| 285 | export async function runShellScript( |
| 286 | fsPath: string, |
| 287 | args: string[] = [], |
| 288 | spawnOpts?: SpawnOptions |
| 289 | ) { |
| 290 | assert(path.isAbsolute(fsPath)); |
| 291 | const destPath = path.dirname(fsPath); |
| 292 | await chmodPlusX(fsPath); |
| 293 | const command = `./${path.basename(fsPath)}`; |
| 294 | await spawnAsync(command, args, { |
| 295 | ...spawnOpts, |
| 296 | cwd: destPath, |
| 297 | prettyCommand: command, |
| 298 | }); |
| 299 | return true; |
| 300 | } |
| 301 | |
| 302 | /** |
| 303 | * @deprecated Don't use this function directly. |
no test coverage detected