Skip to content

Commit

Permalink
Removed duplicated "Error" prefix from error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Mar 21, 2017
1 parent 1f85f6d commit b190c0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/now-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,12 @@ async function sync(token) {
}

// Make sure that directory is deployable
await checkPath(path);
try {
await checkPath(path);
} catch (err) {
error(err);
return;
}

if (!quiet) {
if (gitRepo.main) {
Expand Down
4 changes: 4 additions & 0 deletions lib/utils/output/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ const chalk = require('chalk');

// Prints an error message
module.exports = msg => {
if (msg instanceof Error) {
msg = msg.message;
}

console.error(`${chalk.red('> Error!')} ${msg}`);
};

0 comments on commit b190c0f

Please sign in to comment.