mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: do not pass undefined to Auth header in CI scripts
This commit is contained in:
@@ -36,11 +36,14 @@ const vstsArmJobs = [
|
||||
let jobRequestedCount = 0;
|
||||
|
||||
async function makeRequest ({ auth, url, headers, body, method }) {
|
||||
const clonedHeaders = {
|
||||
...(headers || {})
|
||||
};
|
||||
if (auth && auth.bearer) {
|
||||
clonedHeaders.Authorization = `Bearer ${auth.bearer}`;
|
||||
}
|
||||
const response = await got(url, {
|
||||
headers: {
|
||||
Authorization: auth && auth.bearer ? `Bearer ${auth.bearer}` : undefined,
|
||||
...(headers || {})
|
||||
},
|
||||
headers: clonedHeaders,
|
||||
body,
|
||||
method,
|
||||
auth: auth && auth.password ? `${auth.username}:${auth.password}` : undefined
|
||||
|
||||
Reference in New Issue
Block a user