Browse Source

Removed duplicated "Error" prefix from error messages

master
Leo Lamprecht 8 years ago
parent
commit
b190c0fff5
  1. 7
      bin/now-deploy.js
  2. 4
      lib/utils/output/error.js

7
bin/now-deploy.js

@ -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) {

4
lib/utils/output/error.js

@ -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}`);
};

Loading…
Cancel
Save