Fix config overwrite
This commit is contained in:
parent
fb61bdb1cb
commit
354dac6a52
|
@ -1,4 +1,9 @@
|
|||
|
||||
0.40.1 / 2014-10-01
|
||||
==================
|
||||
|
||||
* Fix config overwrite
|
||||
|
||||
0.40.0 / 2014-10-01
|
||||
==================
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "shout",
|
||||
"description": "The self-hosted web IRC client",
|
||||
"version": "0.40.0",
|
||||
"version": "0.40.1",
|
||||
"author": "Mattias Erming",
|
||||
"preferGlobal": true,
|
||||
"bin": {
|
||||
|
|
|
@ -6,10 +6,10 @@ var child = require("child_process");
|
|||
var Helper = require("../helper");
|
||||
|
||||
var CONFIG_PATH = process.env.SHOUT_CONFIG;
|
||||
if(!CONFIG_PATH) {
|
||||
if (!CONFIG_PATH) {
|
||||
CONFIG_PATH = Helper.resolveHomePath("config.js");
|
||||
}
|
||||
if(!fs.exists(CONFIG_PATH)) {
|
||||
if (!fs.existsSync(CONFIG_PATH)) {
|
||||
mkdirp.sync(Helper.getHomeDirectory());
|
||||
var configFile = fs.readFileSync(path.resolve(__dirname, "..", "..", "config.js"));
|
||||
fs.writeFileSync(CONFIG_PATH, configFile);
|
||||
|
|
Loading…
Reference in New Issue