diff --git a/lib/utils.js b/lib/utils.js index 9cecf8908..3e297d80f 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -408,9 +408,9 @@ class Utils { */ static runCli(args, options) { return __awaiter(this, void 0, void 0, function* () { - let res = yield (0, exec_1.exec)('jf', args, options); + let res = yield (0, exec_1.exec)('jf', args, Object.assign(Object.assign({}, options), { ignoreReturnCode: true })); if (res !== core.ExitCode.Success) { - throw new Error('JFrog CLI exited with exit code ' + res); + throw new Error('JFrog CLI exited with exit code: ' + res); } }); } diff --git a/src/utils.ts b/src/utils.ts index a6adbe2e9..c36c28c52 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -462,9 +462,9 @@ export class Utils { * @param options - Execution options */ public static async runCli(args: string[], options?: ExecOptions) { - let res: number = await exec('jf', args, options); + let res: number = await exec('jf', args, { ...options, ignoreReturnCode: true }); if (res !== core.ExitCode.Success) { - throw new Error('JFrog CLI exited with exit code ' + res); + throw new Error('JFrog CLI exited with exit code: ' + res); } }