We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f86543 commit fe2808fCopy full SHA for fe2808f
src/interceptors/electron.ts
@@ -113,9 +113,10 @@ export class ElectronInterceptor implements Interceptor {
113
114
// Inside the Electron process, load our electron-intercepting JS.
115
const injectionResult = await debugClient.Debugger.evaluateOnCallFrame({
116
- expression: `require("${
117
- path.join(OVERRIDES_DIR, 'js', 'prepend-electron.js')
118
- }")({
+ expression: `require(${
+ // Need to stringify to handle chars that need escaping (e.g. windows backslashes)
+ JSON.stringify(path.join(OVERRIDES_DIR, 'js', 'prepend-electron.js'))
119
+ })({
120
newlineEncodedCertData: "${(await this.certData).replace(/\r\n|\r|\n/g, '\\n')}",
121
spkiFingerprint: "${generateSPKIFingerprint(await this.certData)}"
122
})`,
0 commit comments