Skip to content

Commit

Permalink
Merge pull request #311 from contentstack/fix/dx-1157-error-eexit
Browse files Browse the repository at this point in the history
dx | 1157 | encountering eexit after receiving error
  • Loading branch information
harshithad0703 authored Aug 28, 2024
2 parents dbcfd99 + e53afcd commit ac72dee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
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 ac72dee

Please sign in to comment.