Comparing version 1.0.116 to 1.0.118
@@ -0,1 +1,2 @@ | ||
const fs = require('fs'); | ||
@@ -14,10 +15,7 @@ const Path = require('path'); | ||
if (!fileExists(configFile)) { | ||
if (Path.dirname(fileName) == '.') | ||
configFile = Path.join(Path.dirname(process.argv[1]), fileName); | ||
} | ||
if (!fileExists(configFile)) { | ||
configFile = Path.resolve(process.cwd(), fileName); | ||
} | ||
else | ||
configFile = fileName; | ||
if (fileExists(configFile)) { | ||
@@ -32,7 +30,9 @@ config = JSON.parse(fs.readFileSync(configFile)); | ||
if (!fileExists(configFile)) { | ||
mkpath(Path.dirname(configFile)); | ||
if (configFile != '') { | ||
if (!fileExists(configFile)) { | ||
mkpath(Path.dirname(configFile)); | ||
} | ||
fs.writeFileSync(configFile, JSON.stringify(config, null, '\t')); | ||
} | ||
fs.writeFileSync(configFile, JSON.stringify(config, null, '\t')); | ||
} | ||
@@ -39,0 +39,0 @@ |
{ | ||
"name": "yow", | ||
"version": "1.0.116", | ||
"version": "1.0.118", | ||
"description": "You Only Wish module", | ||
@@ -5,0 +5,0 @@ "main": "yow.js", |
18280