Skip to content

Commit

Permalink
Avoid throwing on JFrog CLI failures
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNino committed Sep 5, 2024
1 parent 9fe0f98 commit 2ffa395
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 2ffa395

Please sign in to comment.