diff --git a/src/config/project/prefs/index.js b/src/config/project/prefs/index.js index 3e827d1..b53040d 100644 --- a/src/config/project/prefs/index.js +++ b/src/config/project/prefs/index.js @@ -14,7 +14,7 @@ module.exports = function getPrefs ({ scope, inventory, errors, _testing }) { /* istanbul ignore next */ if (_testing && scope === 'global') { let _homedir = homedir() - if (process.platform === 'win32') _homedir = _homedir.replace(parsePath(cwd).root, '') + if (process.platform === 'win32') _homedir = _homedir.replace(parsePath(_homedir).root, '') cwd = join(inventory._project.cwd, _homedir) } diff --git a/test/unit/src/config/project/index-test.js b/test/unit/src/config/project/index-test.js index e4f5f13..80831e7 100644 --- a/test/unit/src/config/project/index-test.js +++ b/test/unit/src/config/project/index-test.js @@ -12,7 +12,13 @@ let getProjectConfig = require(sut) let localPrefsFile = 'prefs.arc' let _homedir = homedir() -if (process.platform === 'win32') _homedir = _homedir.replace(parse(cwd).root, '') +// TODO ↓ remove me! ↓ +console.log(`_homedir:`, _homedir) +// TODO ↓ remove me! ↓ +console.log(`cwd:`, cwd) +if (process.platform === 'win32') _homedir = _homedir.replace(parse(_homedir).root, '') +// TODO ↓ remove me! ↓ +console.log(`_homedir:`, _homedir) let globalPrefsFile = join(_homedir, 'prefs.arc') let _testing = true