MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / onInterrupt

Function onInterrupt

lib/models/command.js:197–206  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 2

exitMethod · 0.80
onInterruptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…