Skip to content

Commit 4351b56

Browse files
committed
fix: handle sync spawn error
Node http executor uses HTTPS agent. But! Electron http executor allows us to specify protocol in the options and by default uses `http`. So, we must **always** specify `protocol`. Close #1460
1 parent af14809 commit 4351b56

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/electron-builder-http/src/httpExecutor.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ export function configureRequestOptions(options: RequestOptions, token?: string
297297
if ((method == null || method === "GET") || headers["Cache-Control"] == null) {
298298
headers["Cache-Control"] = "no-cache"
299299
}
300+
301+
if (options.protocol == null) {
302+
options.protocol = "https:"
303+
}
300304
return options
301305
}
302306

0 commit comments

Comments
 (0)