(command, args)
| 17 | * @returns {Promise<void>} promise |
| 18 | */ |
| 19 | const runCommand = (command, args) => |
| 20 | new Promise((resolve, reject) => { |
| 21 | const executedCommand = cp.spawn(command, args, { |
| 22 | stdio: "inherit", |
| 23 | shell: true, |
| 24 | }); |
| 25 | |
| 26 | executedCommand.on("error", (error) => { |
| 27 | reject(error); |
| 28 | }); |
| 29 | |
| 30 | executedCommand.on("exit", (code) => { |
| 31 | if (code === 0) { |
| 32 | resolve(); |
| 33 | } else { |
| 34 | reject(); |
| 35 | } |
| 36 | }); |
| 37 | }); |
| 38 | |
| 39 | /** |
| 40 | * @param {string} packageName name of the package |
no outgoing calls
no test coverage detected
searching dependent graphs…