thelounge/src/command-line/config.js
2014-09-13 09:41:11 -07:00

16 lines
308 B
JavaScript

var program = require("commander");
var child = require("child_process");
var CONFIG_PATH = process.cwd() + "/config.js";
program
.command("config")
.description("Edit config: '" + CONFIG_PATH + "'")
.action(function() {
child.spawn(
"sudo",
["vi", CONFIG_PATH],
{stdio: "inherit"}
);
});