Skip to content

Commit

Permalink
reordering logic in ZosFilesBaseHandler
Browse files Browse the repository at this point in the history
Signed-off-by: Amber <amber.torrise@broadcom.com>
  • Loading branch information
ATorrise committed Nov 4, 2024
1 parent c90c7e8 commit d20417c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/cli/src/zosfiles/ZosFilesBase.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ export abstract class ZosFilesBaseHandler implements ICommandHandler {
sessCfg, commandParameters.arguments, { parms: commandParameters }
);
const session = new Session(sessCfgWithCreds);

const response = await this.processWithSession(commandParameters, session);

commandParameters.response.progress.endBar();
if (response.commandResponse) {
commandParameters.response.console.log(response.commandResponse);
}
commandParameters.response.data.setObj(response);
if (!response.success && response.commandResponse) {
throw new ImperativeError({
msg: response.errorMessage || response.commandResponse
});
}
if (response.commandResponse) {
commandParameters.response.console.log(response.commandResponse);
}
commandParameters.response.data.setObj(response);
commandParameters.response.progress.endBar();
} catch (error) {
if (commandParameters.arguments.ignoreNotFound && error.errorCode === '404') {
commandParameters.response.data.setObj({ success: true });
Expand Down

0 comments on commit d20417c

Please sign in to comment.