Browse Source

Only log success messages when in TTY

This closes #579
master
Leo Lamprecht 8 years ago
parent
commit
207dd6f46b
  1. 21
      bin/now-deploy.js

21
bin/now-deploy.js

@ -537,10 +537,12 @@ async function sync({ token, config: { currentTeam, user } }) {
now.close() now.close()
// Show build logs // Show build logs
if (deploymentType === 'static') { if (!quiet) {
console.log(`${chalk.cyan('> Deployment complete!')}`) if (deploymentType === 'static') {
} else { console.log(`${chalk.cyan('> Deployment complete!')}`)
printLogs(now.host, token, currentTeam, user) } else {
printLogs(now.host, token, currentTeam, user)
}
} }
} }
@ -621,10 +623,12 @@ async function sync({ token, config: { currentTeam, user } }) {
now.close() now.close()
// Show build logs // Show build logs
if (deploymentType === 'static') { if (!quiet) {
console.log(`${chalk.cyan('> Deployment complete!')}`) if (deploymentType === 'static') {
} else { console.log(`${chalk.cyan('> Deployment complete!')}`)
printLogs(now.host, token, currentTeam, user) } else {
printLogs(now.host, token, currentTeam, user)
}
} }
} }
} }
@ -712,6 +716,7 @@ function printLogs(host, token, currentTeam, user) {
console.log(`> [debug] Removed temporary repo directory`) console.log(`> [debug] Removed temporary repo directory`)
} }
} }
process.exit(1) process.exit(1)
}) })

Loading…
Cancel
Save