Browse Source

now-remove: improve ux a bit, make colors more consistent

master
Guillermo Rauch 9 years ago
parent
commit
ceb7812ec8
  1. 6
      bin/now-remove

6
bin/now-remove

@ -45,7 +45,7 @@ const config = cfg.read();
function readConfirmation () {
return new Promise((resolve, reject) => {
process.stdout.write(`${chalk.cyan('> Are you sure? ')} ${chalk.bold(deploymentId)} ${chalk.cyan('will be removed permanently')} [${chalk.bold('yN')}]`);
process.stdout.write(`${chalk.bold.red('> Are you sure?')} ${chalk.bold(deploymentId)} will be removed permanently ${chalk.gray('[yN] ')}`);
process.stdin.on('data', (d) => {
process.stdin.pause();
resolve(d.toString().trim());
@ -72,8 +72,8 @@ async function remove (token) {
try {
const confirmation = (await readConfirmation()).toLowerCase();
if ('y' !== confirmation) {
console.log(`${chalk.cyan('> Aborted ')}`);
if ('y' !== confirmation || 'yes' !== confirmation) {
console.log('> Aborted');
return;
}

Loading…
Cancel
Save