From df7d681f041b5c86658e28b76d323516dbd433a3 Mon Sep 17 00:00:00 2001 From: Austin Pray <71290498+austinpray-mixpanel@users.noreply.github.com> Date: Tue, 13 May 2025 20:13:00 +0000 Subject: [PATCH] threads defaults to CODEQL_THREADS env var --- init/action.yml | 1 + src/init-action.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init/action.yml b/init/action.yml index c33e8a61e..544eebdb2 100644 --- a/init/action.yml +++ b/init/action.yml @@ -115,6 +115,7 @@ inputs: (which for GitHub-hosted runners is 2 for Linux and Windows and 3 for macOS). This input also sets the number of threads that can later be used by the "analyze" action. required: false + default: "${{ env.CODEQL_THREADS }}" debug: description: >- Enable debugging mode. diff --git a/src/init-action.ts b/src/init-action.ts index e9c6cd0d3..b399d9dc5 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -547,8 +547,7 @@ async function run() { ); core.exportVariable( "CODEQL_THREADS", - process.env["CODEQL_THREADS"] || - getThreadsFlagValue(getOptionalInput("threads"), logger).toString(), + getThreadsFlagValue(getOptionalInput("threads"), logger).toString(), ); // Disable Kotlin extractor if feature flag set