We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7c99c1 commit d61b54cCopy full SHA for d61b54c
1 file changed
lib/reporters.js
@@ -4,13 +4,7 @@ import { fileURLToPath } from 'node:url'
4
function normalizeFile (file, cwd) {
5
let res = file
6
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
+ res = fileURLToPath(file)
14
}
15
res = res.replace(cwd, '')
16
if (res.startsWith('/') || res.startsWith('\\')) {
0 commit comments