Skip to content
This repository was archived by the owner on Nov 3, 2022. It is now read-only.

Commit d8bc519

Browse files
committed
fix windows?
1 parent 3decc57 commit d8bc519

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ class Config {
558558
// up loading the "project" config where the "userconfig" will be,
559559
// which causes some calamaties. So, we only load project config if
560560
// it doesn't match what the userconfig will be.
561-
if (projectFile === this[_get]('userconfig')) {
561+
if (this[_get]('userconfig') && relative(projectFile, this[_get]('userconfig')) === '') {
562562
this.localPrefix = projectDir
563563
this.data.get('project').source = '(project same as "user" config, ignored)'
564564
this.sources.set(this.data.get('project').source, 'project')

test/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,10 @@ t.test('workspace-root settings', async t => {
960960
},
961961
definitions: {
962962
registry: { default: registry },
963+
'workspace-root': {
964+
default: undefined,
965+
type: require('path'),
966+
},
963967
workspace: {
964968
default: [],
965969
type: [Array, String],

0 commit comments

Comments
 (0)