From 69f47159b10c44e939a256f9fc73acc39300aaf9 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 16 Sep 2026 19:55:13 +0100 Subject: [PATCH] Use Result.orElse for bundle extraction paths Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- lib/entry-points.js | 4 +++- src/setup-codeql.ts | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index cc4cf5f24..d23dcaac3 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -152546,7 +152546,9 @@ var downloadCodeQL = async function(source, apiDetails, tarVersion, tempDir, log ); } const toolcacheDestination = getToolcacheDestination({ logger }, source); - const extractedBundlePath = toolcacheDestination.isSuccess() ? toolcacheDestination.value : getTempExtractionDir(tempDir); + const extractedBundlePath = toolcacheDestination.orElse( + getTempExtractionDir(tempDir) + ); const statusReport = await downloadAndExtract( codeqlURL, compressionMethod, diff --git a/src/setup-codeql.ts b/src/setup-codeql.ts index cadbcb399..c476dd885 100644 --- a/src/setup-codeql.ts +++ b/src/setup-codeql.ts @@ -880,9 +880,9 @@ export const downloadCodeQL = async function ( } const toolcacheDestination = getToolcacheDestination({ logger }, source); - const extractedBundlePath = toolcacheDestination.isSuccess() - ? toolcacheDestination.value - : getTempExtractionDir(tempDir); + const extractedBundlePath = toolcacheDestination.orElse( + getTempExtractionDir(tempDir), + ); const statusReport = await downloadAndExtract( codeqlURL,