Skip to content

Commit

Permalink
Windows, please, stop
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanblock committed Dec 6, 2023
1 parent 35ba468 commit acccd24
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config/project/prefs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
8 changes: 7 additions & 1 deletion test/unit/src/config/project/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit acccd24

Please sign in to comment.