Skip to content

Commit

Permalink
fix: handle sync spawn error
Browse files Browse the repository at this point in the history
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 electron-userland#1460
  • Loading branch information
develar committed Apr 16, 2017
1 parent af14809 commit 4351b56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/electron-builder-http/src/httpExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 4351b56

Please sign in to comment.