Skip to content

Commit

Permalink
Handle path sources
Browse files Browse the repository at this point in the history
Not all sources on all platforms are file URLs. Fixes #2889.
  • Loading branch information
mcecode authored Nov 21, 2021
1 parent 5cdeb9d commit 77623a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/snapshot-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ const resolveSourceFile = mem(file => {
return file;
}

return fileURLToPath(payload.sources[0]);
return payload.sources[0].startsWith('file://')
? fileURLToPath(payload.sources[0])
: payload.sources[0];
});

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

0 comments on commit 77623a5

Please sign in to comment.