Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
fix false success
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyspiro committed Mar 4, 2021
1 parent fb391aa commit 00b20d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ function runCosmicCommand(command, invokedCmd, argObj) {
}

scope[cosmicMethod.method](params).then(function(res){
if (res.status && res.status !== 200) {
print.error('Error:')
console.log(res)
process.exit(1)
}
print.success('Success')
console.log(res)
process.exit(0)
Expand Down

0 comments on commit 00b20d7

Please sign in to comment.