mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-17 21:56:36 +02:00
5e7a7a3870
- 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
21 lines
685 B
JavaScript
21 lines
685 B
JavaScript
"use strict";
|
|
|
|
var program = require("commander");
|
|
var child = require("child_process");
|
|
var colors = require("colors/safe");
|
|
var Helper = require("../helper");
|
|
|
|
program
|
|
.command("config")
|
|
.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",
|
|
[Helper.CONFIG_PATH],
|
|
{stdio: "inherit"}
|
|
);
|
|
child_spawn.on("error", function() {
|
|
log.error(`Unable to open ${colors.green(Helper.CONFIG_PATH)}. ${colors.bold("$EDITOR")} is not set, and ${colors.bold("vi")} was not found.`);
|
|
});
|
|
});
|