From 63209c0001b68d0c4d8c7e8d060a9af69735549a Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Fri, 10 Feb 2023 12:25:37 -0700 Subject: [PATCH] fix: dont allow hooks to exit process --- package.json | 4 ++-- src/hooks.ts | 2 +- yarn.lock | 15 ++++++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c3e4459de..708832b48 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "/messages" ], "dependencies": { - "@oclif/core": "^2.0.10", + "@oclif/core": "^2.1.1", "@salesforce/core": "^3.33.1", "@salesforce/kit": "^1.8.3", "@salesforce/ts-types": "^1.7.1", @@ -71,4 +71,4 @@ "publishConfig": { "access": "public" } -} \ No newline at end of file +} diff --git a/src/hooks.ts b/src/hooks.ts index f9eba327e..ee80274f3 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -39,7 +39,7 @@ export class SfHook { options: SfHooks[T]['options'] = {} ): Promise> { const timeout = Duration.milliseconds(env.getNumber('SF_HOOK_TIMEOUT_MS') ?? 5000); - const results = await config.runHook(hookName, options, timeout.milliseconds); + const results = await config.runHook(hookName, options, timeout.milliseconds, true); results.failures.forEach((failure) => { ux.debug(`Failed to run ${hookName} hook for ${failure.plugin.name}`); ux.debug(failure.error.toString()); diff --git a/yarn.lock b/yarn.lock index 8d0c7104b..4ff6a523f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -574,10 +574,10 @@ widest-line "^3.1.0" wrap-ansi "^7.0.0" -"@oclif/core@^2.0.10": - version "2.0.10" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.0.10.tgz#2d5ffd79b05de388934103ff567b8d6d0886a501" - integrity sha512-icRaEpQ/dK596Z0rYcGoeMTiXyPv9DbTm8c47NcDXmmOvMuxBr1ntB9/QjsD1fe0BcjZtsfRAbsBT0RgEHwuhg== +"@oclif/core@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.1.1.tgz#8ffa83fe39f43bd66fb6f0731527b17911fc937e" + integrity sha512-t0zez9ydn3eveZM2vsMbrL2hNKzlHSfwEl4A29VlIimOxpQDB9AKZXX02lhTB3BSKbVF24UOlkzYiX7n9Bdc0A== dependencies: "@types/cli-progress" "^3.11.0" ansi-escapes "^4.3.2" @@ -603,7 +603,7 @@ strip-ansi "^6.0.1" supports-color "^8.1.1" supports-hyperlinks "^2.2.0" - tslib "^2.4.1" + tslib "^2.5.0" widest-line "^3.1.0" wordwrap "^1.0.0" wrap-ansi "^7.0.0" @@ -5520,6 +5520,11 @@ tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.4.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== +tslib@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"