Remove the unecessary proxy setting

This commit is contained in:
James McMeeking 2026-05-08 13:12:40 +01:00
parent 28132ba3fc
commit 7ce44b4c62
No known key found for this signature in database
GPG key ID: C69A11061EE15228
2 changed files with 1 additions and 22 deletions

View file

@ -9,13 +9,9 @@ import { reportCommandExecutionFailure } from "../_shared/commandErrors.js";
*/
export async function runRushCommand(executableName, args) {
try {
const env = prepareRushEnvironmentVariables(
mergeSafeChainProxyEnvironmentVariables(process.env),
);
const result = await safeSpawn(executableName, args, {
stdio: "inherit",
env,
env: mergeSafeChainProxyEnvironmentVariables(process.env),
});
return { status: result.status };
@ -23,19 +19,3 @@ export async function runRushCommand(executableName, args) {
return reportCommandExecutionFailure(error, executableName);
}
}
/**
* @param {Record<string, string>} env
* @returns {Record<string, string>}
*/
function prepareRushEnvironmentVariables(env) {
const prepared = {
...env,
};
if (prepared.HTTPS_PROXY && !prepared.HTTP_PROXY) {
prepared.HTTP_PROXY = prepared.HTTPS_PROXY;
}
return prepared;
}

View file

@ -74,7 +74,6 @@ describe("runRushCommand", () => {
assert.deepStrictEqual(args, ["install"]);
assert.strictEqual(options.stdio, "inherit");
assert.strictEqual(options.env.HTTPS_PROXY, "http://localhost:8080");
assert.strictEqual(options.env.HTTP_PROXY, "http://localhost:8080");
assert.ok(mergeCalls.length >= 1, "proxy env merge should be called");
});