Merge pull request #2196 from thelounge/astorije/rm-config-cli

Remove `thelounge config` from the CLI
This commit is contained in:
Jérémie Astori 2018-03-11 15:54:30 -04:00 committed by GitHub
commit 35e5ff2fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 29 deletions

View File

@ -1,28 +0,0 @@
"use strict";
const program = require("commander");
const child = require("child_process");
const colors = require("chalk");
const fs = require("fs");
const Helper = require("../helper");
const Utils = require("./utils");
program
.command("config")
.description(`Edit configuration file located at ${colors.green(Helper.getConfigPath())}.`)
.on("--help", Utils.extraHelp)
.action(function() {
if (!fs.existsSync(Helper.getConfigPath())) {
log.error(`${Helper.getConfigPath()} does not exist.`);
return;
}
const child_spawn = child.spawn(
process.env.EDITOR || "vi",
[Helper.getConfigPath()],
{stdio: "inherit"}
);
child_spawn.on("error", function() {
log.error(`Unable to open ${colors.green(Helper.getConfigPath())}. ${colors.bold("$EDITOR")} is not set, and ${colors.bold("vi")} was not found.`);
});
});

View File

@ -41,7 +41,6 @@ Utils.checkOldHome();
_.merge(Helper.config, program.config); _.merge(Helper.config, program.config);
require("./start"); require("./start");
require("./config");
if (!Helper.config.public && !Helper.config.ldap.enable) { if (!Helper.config.public && !Helper.config.ldap.enable) {
require("./users"); require("./users");