Skip to content

Commit 4606cf9

Browse files
committed
Fix Electron injection on Windows
1 parent dabffb4 commit 4606cf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interceptors/electron.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ export class ElectronInterceptor implements Interceptor {
8787
// Inside the Electron process, load our electron-intercepting JS.
8888
const injectionResult = await debugClient.Debugger.evaluateOnCallFrame({
8989
expression: `require("${
90-
// Inside the Electron process, load our electron-intercepting JS
91-
require.resolve('../../overrides/js/prepend-electron.js')
90+
// Need to escape slashes to ensure this works on Windows (where all paths have backslashes)
91+
require.resolve('../../overrides/js/prepend-electron.js').replace(/\\/g, '\\\\')
9292
}")({
9393
newlineEncodedCertData: "${(await this.certData).replace(/\r\n|\r|\n/g, '\\n')}",
9494
spkiFingerprint: "${generateSPKIFingerprint(await this.certData)}"

0 commit comments

Comments
 (0)