Skip to content

Commit 77623a5

Browse files
authored
Handle path sources
Not all sources on all platforms are file URLs. Fixes #2889.
1 parent 5cdeb9d commit 77623a5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/snapshot-manager.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,9 @@ const resolveSourceFile = mem(file => {
398398
return file;
399399
}
400400

401-
return fileURLToPath(payload.sources[0]);
401+
return payload.sources[0].startsWith('file://')
402+
? fileURLToPath(payload.sources[0])
403+
: payload.sources[0];
402404
});
403405

404406
export const determineSnapshotDir = mem(({file, fixedLocation, projectDir}) => {

0 commit comments

Comments
 (0)