From 2954afd77d3b2031aaef9adf1e7d5d9d36a15d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 11 Mar 2018 14:36:57 -0400 Subject: [PATCH] Remove `thelounge config` from the CLI --- src/command-line/config.js | 28 ---------------------------- src/command-line/index.js | 1 - 2 files changed, 29 deletions(-) delete mode 100644 src/command-line/config.js diff --git a/src/command-line/config.js b/src/command-line/config.js deleted file mode 100644 index d3efbdad..00000000 --- a/src/command-line/config.js +++ /dev/null @@ -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.`); - }); - }); diff --git a/src/command-line/index.js b/src/command-line/index.js index 36f64d1c..9ea7dbf4 100644 --- a/src/command-line/index.js +++ b/src/command-line/index.js @@ -41,7 +41,6 @@ Utils.checkOldHome(); _.merge(Helper.config, program.config); require("./start"); -require("./config"); if (!Helper.config.public && !Helper.config.ldap.enable) { require("./users");