Skip to content

Commit

Permalink
Fix entry point error logging (microsoft#1357)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Urmeev authored Mar 31, 2021
1 parent f681add commit c869e69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/appcenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ function runCli() {
runner(args).then(function (result) {
if (commandLine.failed(result)) {
const chalk = require("chalk");
console.log(`${chalk.bold.red("Error:")} ${result.errorMessage}`);
const ioOptions = require("../dist/util/interaction/io-options");
if (ioOptions.formatIsJson()) {
console.log(`${chalk.red(JSON.stringify(result))}`);
} else {
console.log(`${chalk.bold.red("Error:")} ${result.errorMessage}`);
}
process.exit(result.errorCode);
}
});
Expand Down

0 comments on commit c869e69

Please sign in to comment.