hardlounge/src/command-line/config.js
2014-09-09 13:06:36 -07:00

16 lines
310 B
JavaScript

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