@@ -2325,7 +2325,7 @@ class HttpClient {
2325
2325
if (this._keepAlive && useProxy) {
2326
2326
agent = this._proxyAgent;
2327
2327
}
2328
- if (this._keepAlive && !useProxy) {
2328
+ if (!useProxy) {
2329
2329
agent = this._agent;
2330
2330
}
2331
2331
// if agent is already assigned use that agent.
@@ -2357,16 +2357,12 @@ class HttpClient {
2357
2357
agent = tunnelAgent(agentOptions);
2358
2358
this._proxyAgent = agent;
2359
2359
}
2360
- // if reusing agent across request and tunneling agent isn't assigned create a new agent
2361
- if (this._keepAlive && !agent) {
2360
+ // if tunneling agent isn't assigned create a new agent
2361
+ if (!agent) {
2362
2362
const options = { keepAlive: this._keepAlive, maxSockets };
2363
2363
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
2364
2364
this._agent = agent;
2365
2365
}
2366
- // if not using private agent and tunnel agent isn't setup then use global agent
2367
- if (!agent) {
2368
- agent = usingSsl ? https.globalAgent : http.globalAgent;
2369
- }
2370
2366
if (usingSsl && this._ignoreSslError) {
2371
2367
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
2372
2368
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
@@ -30527,9 +30523,6 @@ async function run() {
30527
30523
const intermediates = core.getInput("intermediates").split(" ");
30528
30524
const key = core.getInput("key");
30529
30525
let outfile = core.getInput("outfile");
30530
- outfile = outfile
30531
- ? outfile
30532
- : path.join(os.tmpdir(), step + "-attestation.json");
30533
30526
const productExcludeGlob = core.getInput("product-exclude-glob");
30534
30527
const productIncludeGlob = core.getInput("product-include-glob");
30535
30528
const spiffeSocket = core.getInput("spiffe-socket");
@@ -30595,7 +30588,8 @@ async function run() {
30595
30588
}
30596
30589
30597
30590
if (trace) cmd.push(`--trace=${trace}`);
30598
- cmd.push(`--outfile=${outfile}`);
30591
+ if (outfile)
30592
+ cmd.push(`--outfile=${outfile}`);
30599
30593
core.info("Running in directory " + process.env.GITHUB_WORKSPACE);
30600
30594
30601
30595
process.env.PATH = `${__dirname}:${process.env.PATH}`;
0 commit comments