Skip to content

Commit

Permalink
Prettify print of settings change ✅
Browse files Browse the repository at this point in the history
  • Loading branch information
knutkirkhorn committed Apr 3, 2019
1 parent d5d2e0a commit 1a2ddd2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ function exitError(error) {

// For calling all funtions every time in a timeout with `a` flag
function checkAllFlags() {
spinner.start();

// If `s` flag is set => set currency as default
if (cli.flags.s !== undefined) {
defaultCurrency = isValidCurrencyCode(cli.flags.s);
Expand All @@ -139,7 +137,7 @@ function checkAllFlags() {
if (error) {
exitError('Something wrong happened, could not save new default currency.');
} else {
console.log(`Default currency set to: ${defaultCurrency.code} (${defaultCurrency.symbol})`);
console.log(chalk.green(`✔️ Default currency set to: ${defaultCurrency.code} (${defaultCurrency.symbol})`));
}
});
}
Expand All @@ -166,13 +164,17 @@ function checkAllFlags() {
if (error) {
exitError('Something wrong happened, could not save new quantity.');
} else {
console.log(`Quantity set to: ${quantity}`);
console.log(chalk.green(`✔️ Quantity set to: ${quantity}`));
console.log(`Value of ${quantity} BTC:`);
spinner.start();
}
});
}
} else {
console.log(`Value of ${quantity} BTC:`);
spinner.start();
}

console.log(`Value of ${quantity} BTC:`);
multiplier = quantity;
}

Expand Down

0 comments on commit 1a2ddd2

Please sign in to comment.