Skip to content

Commit d61b54c

Browse files
authored
fix: do not attempt to repair broken URLs (#13)
1 parent c7c99c1 commit d61b54c

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

lib/reporters.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ import { fileURLToPath } from 'node:url'
44
function normalizeFile (file, cwd) {
55
let res = file
66
if (file.startsWith('file://')) {
7-
try {
8-
res = fileURLToPath(new URL(file))
9-
} catch (err) {
10-
if (err.code === 'ERR_INVALID_FILE_URL_PATH') {
11-
res = fileURLToPath(new URL(file.replace('file:///', 'file://')))
12-
}
13-
}
7+
res = fileURLToPath(file)
148
}
159
res = res.replace(cwd, '')
1610
if (res.startsWith('/') || res.startsWith('\\')) {

0 commit comments

Comments
 (0)