From f44bfe93374593220efe92652418a6fe9da80326 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Thu, 19 Oct 2023 19:03:18 -0300 Subject: [PATCH] fix: pretty-print sfdx-core err --- package.json | 2 +- src/commands/org/login/jwt.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ed0ae12b..f8ca64ad 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/plugin-auth", "description": "plugin for sfdx auth commands", - "version": "2.8.22", + "version": "2.8.23-dev.0", "author": "Salesforce", "bugs": "https://github.com/forcedotcom/cli/issues", "main": "lib/index.js", diff --git a/src/commands/org/login/jwt.ts b/src/commands/org/login/jwt.ts index c33e69e2..799634c8 100644 --- a/src/commands/org/login/jwt.ts +++ b/src/commands/org/login/jwt.ts @@ -101,7 +101,10 @@ export default class LoginJwt extends AuthBaseCommand { if (!(err instanceof Error)) { throw err; } - throw messages.createError('JwtGrantError', [err.message]); + // pretty-print err from sfdx-core to get stacktrace swalloed by sf + // eslint-disable-next-line + console.error(err); + throw messages.createError('JwtGrantError', [err.message], undefined, undefined, err); } const successMsg = commonMessages.getMessage('authorizeCommandSuccess', [result.username, result.orgId]);