Skip to content

Commit 9c626a9

Browse files
authored
omit file protocol for create-svelte tests outside CI (#9121)
1 parent 8df51ac commit 9c626a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/create-svelte/test/check.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ const overrides = { ...existing_workspace_overrides };
2121
await glob(fileURLToPath(new URL('../../../packages', import.meta.url)) + '/*/package.json')
2222
).forEach((pkgPath) => {
2323
const name = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')).name;
24-
// use `file:` protocol for opting into stricter resolve logic which catches more bugs
25-
overrides[name] = `file:${path.dirname(path.resolve(pkgPath))}`;
24+
// use `file:` protocol for opting into stricter resolve logic which catches more bugs,
25+
// but only on CI because it doesn't work locally for some reason
26+
const protocol = process.env.CI ? 'file:' : '';
27+
overrides[name] = `${protocol}${path.dirname(path.resolve(pkgPath))}`;
2628
});
2729

2830
try {

0 commit comments

Comments
 (0)