Commit 7e57b16 1 parent ab15ea4 commit 7e57b16 Copy full SHA for 7e57b16
File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ function isFileSpec (spec) {
66
66
if ( isWindows ) {
67
67
return isWindowsFile . test ( spec )
68
68
}
69
+ // We never hit this in windows tests, obviously
70
+ /* istanbul ignore next */
69
71
return isPosixFile . test ( spec )
70
72
}
71
73
@@ -342,6 +344,12 @@ function fromFile (res, where) {
342
344
res . fetchSpec = path . resolve ( where , resolvedPath )
343
345
// re-normalize the slashes in saveSpec due to node:path/win32 behavior in windows
344
346
res . saveSpec = res . saveSpec . split ( '\\' ) . join ( '/' )
347
+ // Ignoring because this only happens in windows
348
+ /* istanbul ignore next */
349
+ if ( res . saveSpec . startsWith ( 'file://' ) ) {
350
+ // normalization of \\win32\root paths can cause a double / which we don't want
351
+ res . saveSpec = `file:/${ res . saveSpec . slice ( 7 ) } `
352
+ }
345
353
return res
346
354
}
347
355
You can’t perform that action at this time.
0 commit comments