Browse Source

fix rename

master
Guillermo Rauch 9 years ago
parent
commit
8354ee8cea
  1. 5
      bin/now-secrets

5
bin/now-secrets

@ -131,7 +131,6 @@ async function run (token) {
if (theSecret) {
const yes = await readConfirmation(theSecret);
if (!yes) {
console.log('woot');
error('User abort');
return exit(0);
}
@ -151,9 +150,9 @@ async function run (token) {
error(`Invalid number of arguments. Usage: ${chalk.cyan('`now secret rename <old-name> <new-name>`')}`);
return exit(1);
}
const secret = await secrets.patch(args[0], args[1]);
const secret = await secrets.rename(args[0], args[1]);
const elapsed = ms(new Date() - start);
console.log(`${chalk.cyan('> Success!')} Secret ${chalk.bold(secret.name)} ${chalk.gray(`(${secret.uid})`)} renamed to ${chalk.bold('my-secret-name')} ${chalk.gray(`[${elapsed}]`)}`);
console.log(`${chalk.cyan('> Success!')} Secret ${chalk.bold(secret.oldName)} ${chalk.gray(`(${secret.uid})`)} renamed to ${chalk.bold(args[1])} ${chalk.gray(`[${elapsed}]`)}`);
return secrets.close();
}

Loading…
Cancel
Save