Move NODE_USE_ENV_PROXY assignment to top of file

Relocated the setting of process.env.NODE_USE_ENV_PROXY to the beginning of main.js for improved clarity and to ensure the environment variable is set before any imports or logic are executed.
This commit is contained in:
Parker Brown
2025-08-22 13:05:03 -07:00
parent fe4ba3360a
commit 39808af6a2
+1 -2
View File
@@ -1,4 +1,5 @@
// @ts-check
process.env.NODE_USE_ENV_PROXY = "1";
import core from "@actions/core";
import { createAppAuth } from "@octokit/auth-app";
@@ -15,8 +16,6 @@ if (!process.env.GITHUB_REPOSITORY_OWNER) {
throw new Error("GITHUB_REPOSITORY_OWNER missing, must be set to '<owner>'");
}
process.env.NODE_USE_ENV_PROXY = "1";
const appId = core.getInput("app-id");
const privateKey = core.getInput("private-key");
const owner = core.getInput("owner");