Browse Source

handle user abort in `now domains buy` (#554)

Fixes #547.
master
Nathan Rajlich 8 years ago
committed by Guillermo Rauch
parent
commit
34151c8193
  1. 22
      bin/now-domains.js

22
bin/now-domains.js

@ -272,12 +272,22 @@ async function run({ token, config: { currentTeam, user } }) {
break break
} }
case 'buy': { case 'buy': {
await require(resolve(__dirname, 'domains', 'buy.js'))({ try {
domains: domain, await require(resolve(__dirname, 'domains', 'buy.js'))({
args, domains: domain,
currentTeam, args,
user currentTeam,
}) user
})
} catch (err) {
if (err.message === 'USER_ABORT') {
// Move the prompt to a newline before exiting
console.log()
process.exit(1)
} else {
throw err
}
}
break break
} }
default: default:

Loading…
Cancel
Save