From 4351b569ce5d8263724982ec874d2ceb93931829 Mon Sep 17 00:00:00 2001 From: develar Date: Sun, 16 Apr 2017 11:29:40 +0200 Subject: [PATCH] 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 --- packages/electron-builder-http/src/httpExecutor.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/electron-builder-http/src/httpExecutor.ts b/packages/electron-builder-http/src/httpExecutor.ts index bef00cdc96e..ff9a51e14df 100644 --- a/packages/electron-builder-http/src/httpExecutor.ts +++ b/packages/electron-builder-http/src/httpExecutor.ts @@ -297,6 +297,10 @@ export function configureRequestOptions(options: RequestOptions, token?: string if ((method == null || method === "GET") || headers["Cache-Control"] == null) { headers["Cache-Control"] = "no-cache" } + + if (options.protocol == null) { + options.protocol = "https:" + } return options }