From 77623a5f32c139fa4ef7d316a4bbf7e172cc5acb Mon Sep 17 00:00:00 2001 From: Matthew Espino <65783406+mcecode@users.noreply.github.com> Date: Mon, 22 Nov 2021 01:28:10 +0800 Subject: [PATCH] Handle path sources Not all sources on all platforms are file URLs. Fixes #2889. --- lib/snapshot-manager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/snapshot-manager.js b/lib/snapshot-manager.js index e7b907927..c7a907810 100644 --- a/lib/snapshot-manager.js +++ b/lib/snapshot-manager.js @@ -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}) => {