From a0127daef15e896367b6714288ad42991beae869 Mon Sep 17 00:00:00 2001 From: Olli Vanhoja Date: Tue, 23 Aug 2016 22:52:47 +0300 Subject: [PATCH] Warn about removing bound aliases when removing a domain --- bin/now-domains | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/now-domains b/bin/now-domains index a2fcaba..d69de4d 100755 --- a/bin/now-domains +++ b/bin/now-domains @@ -217,6 +217,11 @@ async function readConfirmation (domain, _domain, list) { process.stdout.write('> The following domain will be removed permanently\n'); process.stdout.write(' ' + tbl + '\n'); + if (_domain.aliases.length) { + process.stdout.write(`> ${chalk.yellow('Warning!')} This domain's ` + + `${chalk.bold(_domain.aliases.length + ' alias' + (_domain.aliases.length > 1 ? 'es': ''))} ` + + `will be removed. Run ${chalk.dim('`now alias ls`')} to list.\n`); + } process.stdout.write(` ${chalk.bold.red('> Are you sure?')} ${chalk.gray('[yN] ')}`); process.stdin.on('data', (d) => {