Skip to content

Commit

Permalink
fix: improve error message if action has failed
Browse files Browse the repository at this point in the history
  • Loading branch information
wallet77 committed Mar 5, 2018
1 parent 33d1fb3 commit dacc654
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/API/Extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,10 +644,15 @@ module.exports = function(CLI) {
const that = this;
if(semver.satisfies(process.versions.node, '>= 8.0.0')) {
this.trigger(app_name, 'internal:inspect', function (err, res) {
if(res && res[0].data.return === '') {
Common.printOut(`Inspect disabled on ${app_name}`);

if(res && res[0]) {
if (res[0].data.return === '') {
Common.printOut(`Inspect disabled on ${app_name}`);
} else {
Common.printOut(`Inspect enabled on ${app_name} => go to chrome : chrome://inspect !!!`);
}
} else {
Common.printOut(`Inspect enabled on ${app_name} => go to chrome : chrome://inspect !!!`);
Common.printOut(`Impossible to enabled inspect mode on ${app_name} !!!`);
}

that.exitCli(cst.SUCCESS_EXIT);
Expand Down

0 comments on commit dacc654

Please sign in to comment.