From 0523226252aa4fd6b6ddadd5742f804709d2909b Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sun, 14 Aug 2016 17:41:58 -0700 Subject: [PATCH 1/3] now-deploy: fix `if` --- bin/now-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/now-deploy b/bin/now-deploy index 773dbc4..619e73d 100755 --- a/bin/now-deploy +++ b/bin/now-deploy @@ -211,7 +211,7 @@ async function sync (token) { } else if (hasPackage) { if (debug) console.log('[debug] `package.json` found, assuming `deploymentType` = `npm`'); deploymentType = 'npm'; - } else if (hasDockerFile) { + } else if (hasDockerfile) { if (debug) console.log('[debug] `Dockerfile` found, assuming `deploymentType` = `docker`'); deploymentType = 'docker'; } else { From 14be7dd8181cc9b1a4d43be695b144599034a9fb Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sun, 14 Aug 2016 23:11:12 -0700 Subject: [PATCH 2/3] build-logger: handle socket errors better --- lib/build-logger.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/build-logger.js b/lib/build-logger.js index 286e804..f0d6700 100644 --- a/lib/build-logger.js +++ b/lib/build-logger.js @@ -8,6 +8,7 @@ export default class Logger extends EventEmitter { constructor (host, { debug = false, quiet = false } = {}) { super(); this.host = host; + this.debug = debug; this.quiet = quiet; // readyState @@ -84,10 +85,10 @@ export default class Logger extends EventEmitter { this.emit('close'); } - onSocketError () { - this.removeAllListeners(); - console.error('> Connection error'); - this.emit('error'); + onSocketError (err) { + if (this.debug) { + console.log('> [debug] Socket error', err.stack); + } } } From ba7956341646bb602799a36b858d943a41428cb6 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Sun, 14 Aug 2016 23:11:46 -0700 Subject: [PATCH 3/3] now-deploy: remove build logger erorr handler --- bin/now-deploy | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/now-deploy b/bin/now-deploy index 619e73d..697ac59 100755 --- a/bin/now-deploy +++ b/bin/now-deploy @@ -313,9 +313,6 @@ async function sync (token) { function printLogs (host) { // log build const logger = new Logger(host, { debug, quiet }); - logger.on('error', () => { - process.exit(1); - }); logger.on('close', () => { if (!quiet) { console.log(`${chalk.cyan('> Deployment complete!')}`);