File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ function isFileSpec (spec) {
6666 if ( isWindows ) {
6767 return isWindowsFile . test ( spec )
6868 }
69+ // We never hit this in windows tests, obviously
70+ /* istanbul ignore next */
6971 return isPosixFile . test ( spec )
7072}
7173
@@ -342,6 +344,12 @@ function fromFile (res, where) {
342344 res . fetchSpec = path . resolve ( where , resolvedPath )
343345 // re-normalize the slashes in saveSpec due to node:path/win32 behavior in windows
344346 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+ }
345353 return res
346354}
347355
You can’t perform that action at this time.
0 commit comments