diff --git a/package.json b/package.json index 481782c4..533f0951 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "/messages" ], "dependencies": { - "@oclif/core": "^2.3.1", + "@oclif/core": "^2.4.0", "@salesforce/core": "^3.33.5", "@salesforce/kit": "^1.9.0", "@salesforce/ts-types": "^1.7.3", diff --git a/src/sfCommand.ts b/src/sfCommand.ts index 660d3300..41dfc439 100644 --- a/src/sfCommand.ts +++ b/src/sfCommand.ts @@ -477,9 +477,12 @@ export abstract class SfCommand extends Command { err.stack = sfCommandError.stack; // @ts-expect-error because code is not on SfError err.code = codeFromError; - // @ts-expect-error because code is not on SfError + // @ts-expect-error because status is not on SfError err.status = sfCommandError.status; + // @ts-expect-error because skipOclifErrorHandling is not on SfError + err.skipOclifErrorHandling = true; + throw err; } diff --git a/yarn.lock b/yarn.lock index a5f7a221..bbeb7d79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -658,10 +658,10 @@ supports-color "^8.1.1" tslib "^2" -"@oclif/core@^2.1.7", "@oclif/core@^2.3.0", "@oclif/core@^2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.3.1.tgz#82d977338c68b3faeda84f780c2f97a3dd322cb2" - integrity sha512-18CkjjF16hwhBd/42z+0CHAwvZlBfpyCmdZxpasN/od8c/hdm0oDEJvVB33/xD0LDYg8glKoQ5zVNVvPM/uJ/Q== +"@oclif/core@^2.1.7", "@oclif/core@^2.3.0", "@oclif/core@^2.3.1", "@oclif/core@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.4.0.tgz#8e5983dd0d50a3c0c170a844fe8925cb639f0a9f" + integrity sha512-wWUnOOfQQty0k1Cstm/iWW6pbG0mHzU7rcUtab2Sni9kjBPCcy6ENTgpsWbb/WdITopqtXmvpYII2fgcjKdzUA== dependencies: "@types/cli-progress" "^3.11.0" ansi-escapes "^4.3.2"