Skip to content

Commit

Permalink
fix: nsis update fails for private github repos (#4568)
Browse files Browse the repository at this point in the history
  • Loading branch information
qevni authored and develar committed Jan 16, 2020
1 parent ac8e9aa commit beb2729
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/builder-util-runtime/src/httpExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,9 @@ export function configureRequestOptions(options: RequestOptions, token?: string
options.method = method
}

let headers = options.headers
if (headers == null) {
headers = {}
options.headers = headers
}
options.headers = {...options.headers}
const headers = options.headers

if (token != null) {
(headers as any).authorization = token.startsWith("Basic") ? token : `token ${token}`
}
Expand Down

0 comments on commit beb2729

Please sign in to comment.