Merge pull request #1418 from thelounge/astorije/cli-config-take-two
Document recent CLI changes in help + rename to .lounge_home
This commit is contained in:
commit
aef1bb3acc
@ -73,7 +73,7 @@ module.exports = {
|
|||||||
// which in result fixes mixed content warnings.
|
// which in result fixes mixed content warnings.
|
||||||
//
|
//
|
||||||
// If storage is enabled, The Lounge will fetch and store images and thumbnails
|
// 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),
|
// 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.
|
// and the folder is cleaned up on every The Lounge restart.
|
||||||
|
@ -7,7 +7,7 @@ var Helper = require("../helper");
|
|||||||
|
|
||||||
program
|
program
|
||||||
.command("config")
|
.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() {
|
.action(function() {
|
||||||
var child_spawn = child.spawn(
|
var child_spawn = child.spawn(
|
||||||
process.env.EDITOR || "vi",
|
process.env.EDITOR || "vi",
|
||||||
|
@ -10,12 +10,12 @@ var path = require("path");
|
|||||||
var Helper = require("../helper");
|
var Helper = require("../helper");
|
||||||
|
|
||||||
program.version(Helper.getVersion(), "-v, --version")
|
program.version(Helper.getVersion(), "-v, --version")
|
||||||
.option("--home <path>", "path to configuration folder")
|
.option("--home <path>", `${colors.bold("[DEPRECATED]")} Use the ${colors.green("LOUNGE_HOME")} environment variable instead.`)
|
||||||
.parseOptions(process.argv);
|
.parseOptions(process.argv);
|
||||||
|
|
||||||
if (program.home) {
|
if (program.home) {
|
||||||
log.warn(`${colors.green("--home")} is deprecated and will be removed in a future version.`);
|
log.warn(`${colors.green("--home")} is ${colors.bold("deprecated")} and will be removed in a future version.`);
|
||||||
log.warn(`Use ${colors.green("LOUNGE_HOME")} environment variable instead.`);
|
log.warn(`Use the ${colors.green("LOUNGE_HOME")} environment variable instead.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let home = program.home || process.env.LOUNGE_HOME;
|
let home = program.home || process.env.LOUNGE_HOME;
|
||||||
@ -25,7 +25,7 @@ if (!home) {
|
|||||||
__dirname,
|
__dirname,
|
||||||
"..",
|
"..",
|
||||||
"..",
|
"..",
|
||||||
".lounge_config"
|
".lounge_home"
|
||||||
));
|
));
|
||||||
|
|
||||||
home = fs.readFileSync(distConfig, "utf-8").trim();
|
home = fs.readFileSync(distConfig, "utf-8").trim();
|
||||||
|
Loading…
Reference in New Issue
Block a user