* Called when command is interrupted from outside, e.g. ctrl+C or process kill * Can be used to cleanup artifacts produced by command and control process exit code * * @method onInterrupt * @return {Promise|undefined} if rejected promise then result of promise will be used as an exit cod
()
| 195 | * @return {Promise|undefined} if rejected promise then result of promise will be used as an exit code |
| 196 | */ |
| 197 | onInterrupt() { |
| 198 | if (this._currentTask) { |
| 199 | return this._currentTask.onInterrupt(); |
| 200 | } else { |
| 201 | // interrupt all external commands which don't use `runTask()` with an error |
| 202 | |
| 203 | // eslint-disable-next-line n/no-process-exit |
| 204 | process.exit(1); |
| 205 | } |
| 206 | }, |
| 207 | |
| 208 | _env(/* name */) { |
| 209 | return { |
nothing calls this directly
no test coverage detected
searching dependent graphs…