Skip to content

Commit bb04501

Browse files
Merge pull request #27 from step-security/auto-cherry-pick
chore: Cherry-picked changes from upstream
2 parents a15cb57 + 248aefa commit bb04501

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

dist/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16944,7 +16944,7 @@ async function authenticate(url, user, pass, httpProxy) {
1694416944
'Content-Type': 'application/json',
1694516945
},
1694616946
proxy: false,
16947-
httpsAgent: new HttpsProxyAgent(httpProxy),
16947+
httpsAgent: httpProxy ? new HttpsProxyAgent(httpProxy) : undefined,
1694816948
data: {
1694916949
username: user,
1695016950
password: pass,
@@ -16977,7 +16977,7 @@ async function getVersion(url, token, httpProxy) {
1697716977
'Authorization': `Bearer ${token}`,
1697816978
},
1697916979
proxy: false,
16980-
httpsAgent: new HttpsProxyAgent(httpProxy)
16980+
httpsAgent: httpProxy ? new HttpsProxyAgent(httpProxy) : undefined
1698116981
});
1698216982
return res.data;
1698316983
} catch (err) {
@@ -17288,6 +17288,7 @@ async function scan() {
1728817288
if (require.main === require.cache[eval('__filename')]) {
1728917289
scan().catch((err) => core.setFailed(err.message));
1729017290
}
17291+
1729117292
})();
1729217293

1729317294
module.exports = __webpack_exports__;

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function authenticate(url, user, pass, httpProxy) {
3939
'Content-Type': 'application/json',
4040
},
4141
proxy: false,
42-
httpsAgent: new HttpsProxyAgent(httpProxy),
42+
httpsAgent: httpProxy ? new HttpsProxyAgent(httpProxy) : undefined,
4343
data: {
4444
username: user,
4545
password: pass,
@@ -72,7 +72,7 @@ async function getVersion(url, token, httpProxy) {
7272
'Authorization': `Bearer ${token}`,
7373
},
7474
proxy: false,
75-
httpsAgent: new HttpsProxyAgent(httpProxy)
75+
httpsAgent: httpProxy ? new HttpsProxyAgent(httpProxy) : undefined
7676
});
7777
return res.data;
7878
} catch (err) {
@@ -382,4 +382,4 @@ async function scan() {
382382

383383
if (require.main === module) {
384384
scan().catch((err) => core.setFailed(err.message));
385-
}
385+
}

0 commit comments

Comments
 (0)