From 5e7a7a387079e598c95c4b1b8aef581dd6378923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Tue, 15 Aug 2017 23:30:01 -0400 Subject: [PATCH] Update CLI help with regard to recent deprecation of `--home` option - Mark the option as deprecated (cannot be removed from the help, unfortunately) - Add details to `lounge config` regarding `LOUNGE_HOME` - Remove mention of `--home` in default config file --- defaults/config.js | 2 +- src/command-line/config.js | 2 +- src/command-line/index.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/defaults/config.js b/defaults/config.js index 9f757e5f..b103593d 100644 --- a/defaults/config.js +++ b/defaults/config.js @@ -73,7 +73,7 @@ module.exports = { // which in result fixes mixed content warnings. // // If storage is enabled, The Lounge will fetch and store images and thumbnails - // in ~/.lounge/storage folder, or %HOME%/storage if --home is used. + // in the `${LOUNGE_HOME}/storage` folder. // // Images are deleted when they are no longer referenced by any message (controlled by maxHistory), // and the folder is cleaned up on every The Lounge restart. diff --git a/src/command-line/config.js b/src/command-line/config.js index 1eae72f2..e95763d5 100644 --- a/src/command-line/config.js +++ b/src/command-line/config.js @@ -7,7 +7,7 @@ var Helper = require("../helper"); program .command("config") - .description(`Edit configuration file located at ${colors.green(Helper.CONFIG_PATH)}.`) + .description(`Edit configuration file located at ${colors.green(Helper.CONFIG_PATH)}. Set the ${colors.green("LOUNGE_HOME")} environment variable to change.`) .action(function() { var child_spawn = child.spawn( process.env.EDITOR || "vi", diff --git a/src/command-line/index.js b/src/command-line/index.js index 860a2572..e7008456 100644 --- a/src/command-line/index.js +++ b/src/command-line/index.js @@ -10,12 +10,12 @@ var path = require("path"); var Helper = require("../helper"); program.version(Helper.getVersion(), "-v, --version") - .option("--home ", "path to configuration folder") + .option("--home ", `${colors.bold("[DEPRECATED]")} Use the ${colors.green("LOUNGE_HOME")} environment variable instead.`) .parseOptions(process.argv); if (program.home) { - log.warn(`${colors.green("--home")} is deprecated and will be removed in a future version.`); - log.warn(`Use ${colors.green("LOUNGE_HOME")} environment variable instead.`); + log.warn(`${colors.green("--home")} is ${colors.bold("deprecated")} and will be removed in a future version.`); + log.warn(`Use the ${colors.green("LOUNGE_HOME")} environment variable instead.`); } let home = program.home || process.env.LOUNGE_HOME;