Skip to content

Commit

Permalink
fixed receiving eexit after encountering error
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithad0703 committed Aug 26, 2024
1 parent dbcfd99 commit d7432ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $ npm install -g @contentstack/apps-cli
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/apps-cli/1.3.3 darwin-arm64 node-v18.12.1
@contentstack/apps-cli/1.3.3 darwin-x64 node-v20.16.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/commands/app/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ export default class Install extends AppCLIBaseCommand {
error?.status === 400
) {
this.displayReInstallMsg();
} else {
this.exit(1);
}
this.exit(1);
}
}

Expand Down
8 changes: 6 additions & 2 deletions src/commands/app/reinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ export default class Reinstall extends AppCLIBaseCommand {

this.displayStackUrl();
} catch (error: any) {
this.log(error?.errorMessage || error?.message || error, "error");
this.exit(1);
if (error?.errorMessage !== "You are already using the latest version.") {
this.log(error?.errorMessage || error?.message || error, "error");
this.exit(1);
} else {
this.log(error?.errorMessage || error?.message || error, "error");
}
}
}

Expand Down

0 comments on commit d7432ff

Please sign in to comment.