diff --git a/core/bbs.js b/core/bbs.js index 9b3e699d..e364c941 100644 --- a/core/bbs.js +++ b/core/bbs.js @@ -47,26 +47,19 @@ function bbsMain() { // If the user supplied a path and we can't read/parse it // then it's a fatal error // + console.log(err) if(err) { - if('ENOENT' === err.code) { - console.error('Configuration file does not exist: ' + configPath); + if('ENOENT' === err.code) { + if(configPathSupplied) { + console.error('Configuration file does not exist: ' + configPath); + } else { + configPathSupplied = null; // make non-fatal; we'll go with defaults + } } else { console.error(err.toString()); } } callback(err); - /* - if(configPathSupplied && err) { - if('ENOENT' === err.code) { - console.error('Configuration file does not exist: ' + configPath); - } else { - console.error('Failed parsing configuration: ' + configPath); - } - callback(err); - } else { - callback(null); - } - */ }); }, function initSystem(callback) { diff --git a/core/misc_util.js b/core/misc_util.js index ed834ef9..1f3a11df 100644 --- a/core/misc_util.js +++ b/core/misc_util.js @@ -23,7 +23,8 @@ function valueWithDefault(val, defVal) { function resolvePath(path) { if(path.substr(0, 2) === '~/') { - path = (process.env.HOME || process.env.HOMEPATH || process.env.HOMEDIR || process.cwd()) + path.substr(1); + var mswCombined = process.env.HOMEDRIVE + process.env.HOMEPATH; + path = (process.env.HOME || mswCombined || process.env.HOMEPATH || process.env.HOMEDIR || process.cwd()) + path.substr(1); } return paths.resolve(path); } \ No newline at end of file