From 23c3d2f063ecbe3d34ee56b5063d8298a2a53349 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Sun, 4 Feb 2018 21:15:34 -0800 Subject: [PATCH] fix: rethrow cli-ux errors --- package.json | 2 +- src/plugin.ts | 2 +- yarn.lock | 13 +++---------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index dd4daca1..96e53777 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/anycli/config/issues", "dependencies": {}, "devDependencies": { - "@anycli/parser": "^3.2.3", + "@anycli/parser": "^3.2.4", "@anycli/tslint": "^0.2.5", "@types/chai": "^4.1.2", "@types/globby": "^6.1.0", diff --git a/src/plugin.ts b/src/plugin.ts index 7c8e482d..4ae4c08c 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -203,7 +203,7 @@ export class Plugin implements IPlugin { await search(require(p))(opts) } catch (err) { - if (err.code === 'EEXIT') throw err + if (err && err['cli-ux'] && err['cli-ux'].exit !== undefined) throw err process.emitWarning(err) } }) diff --git a/yarn.lock b/yarn.lock index fbe784ef..b9466a8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,16 +2,9 @@ # yarn lockfile v1 -"@anycli/parser@^3.2.3": - version "3.2.3" - resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-3.2.3.tgz#cbc2c25e21b8b7e127986a5287596a7c0aaffe2d" - dependencies: - "@anycli/screen" "^0.0.3" - lodash "^4.17.4" - -"@anycli/screen@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@anycli/screen/-/screen-0.0.3.tgz#f0afd970c3ed725702948a45a874ede1fdd9362e" +"@anycli/parser@^3.2.4": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@anycli/parser/-/parser-3.2.4.tgz#30297ac2fa225b37efaab5c0062bf189988b3ce8" "@anycli/tslint@^0.2.5": version "0.2.5"