Skip to content

Commit b9a85a8

Browse files
authored
Avoid throwing on JFrog CLI failures (#210)
1 parent 9fe0f98 commit b9a85a8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,9 @@ class Utils {
408408
*/
409409
static runCli(args, options) {
410410
return __awaiter(this, void 0, void 0, function* () {
411-
let res = yield (0, exec_1.exec)('jf', args, options);
411+
let res = yield (0, exec_1.exec)('jf', args, Object.assign(Object.assign({}, options), { ignoreReturnCode: true }));
412412
if (res !== core.ExitCode.Success) {
413-
throw new Error('JFrog CLI exited with exit code ' + res);
413+
throw new Error('JFrog CLI exited with exit code: ' + res);
414414
}
415415
});
416416
}

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ export class Utils {
462462
* @param options - Execution options
463463
*/
464464
public static async runCli(args: string[], options?: ExecOptions) {
465-
let res: number = await exec('jf', args, options);
465+
let res: number = await exec('jf', args, { ...options, ignoreReturnCode: true });
466466
if (res !== core.ExitCode.Success) {
467-
throw new Error('JFrog CLI exited with exit code ' + res);
467+
throw new Error('JFrog CLI exited with exit code: ' + res);
468468
}
469469
}
470470

0 commit comments

Comments
 (0)