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
|
0.40.0 / 2014-10-01
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "shout",
|
"name": "shout",
|
||||||
"description": "The self-hosted web IRC client",
|
"description": "The self-hosted web IRC client",
|
||||||
"version": "0.40.0",
|
"version": "0.40.1",
|
||||||
"author": "Mattias Erming",
|
"author": "Mattias Erming",
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -9,7 +9,7 @@ var CONFIG_PATH = process.env.SHOUT_CONFIG;
|
|||||||
if (!CONFIG_PATH) {
|
if (!CONFIG_PATH) {
|
||||||
CONFIG_PATH = Helper.resolveHomePath("config.js");
|
CONFIG_PATH = Helper.resolveHomePath("config.js");
|
||||||
}
|
}
|
||||||
if(!fs.exists(CONFIG_PATH)) {
|
if (!fs.existsSync(CONFIG_PATH)) {
|
||||||
mkdirp.sync(Helper.getHomeDirectory());
|
mkdirp.sync(Helper.getHomeDirectory());
|
||||||
var configFile = fs.readFileSync(path.resolve(__dirname, "..", "..", "config.js"));
|
var configFile = fs.readFileSync(path.resolve(__dirname, "..", "..", "config.js"));
|
||||||
fs.writeFileSync(CONFIG_PATH, configFile);
|
fs.writeFileSync(CONFIG_PATH, configFile);
|
||||||
|
Loading…
Reference in New Issue
Block a user