From 8354ee8cea813b0158d00f3a62d117eaaedf8e22 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Thu, 18 Aug 2016 20:20:07 -0700 Subject: [PATCH] fix rename --- bin/now-secrets | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/now-secrets b/bin/now-secrets index f25fb86..ca72110 100755 --- a/bin/now-secrets +++ b/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 `')}`); 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(); }