Browse Source

Show build errors (#286)

master
Jarmo Isotalo 8 years ago
committed by Leo Lamprecht
parent
commit
a6cad020f9
  1. 16
      bin/now-deploy.js
  2. 1
      lib/build-logger.js

16
bin/now-deploy.js

@ -623,6 +623,22 @@ function printLogs(host, token) {
// log build
const logger = new Logger(host, {debug, quiet})
logger.on('error', async () => {
if (!quiet) {
console.log(`${chalk.cyan('> Deployment failed!')}`)
}
if (gitRepo && gitRepo.cleanup) {
// Delete temporary directory that contains repository
gitRepo.cleanup()
if (debug) {
console.log(`> [debug] Removed temporary repo directory`)
}
}
process.exit(1)
})
logger.on('close', async () => {
if (Array.isArray(autoAliases)) {
const aliasList = autoAliases.filter(item => item !== '')

1
lib/build-logger.js

@ -57,7 +57,6 @@ module.exports = class Logger extends EventEmitter {
}
if (state.error) {
console.error('> Deployment error')
this.emit('error')
return
}

Loading…
Cancel
Save