From 88bcf64e02c4dffb7bded80efda37efcdb69b07a Mon Sep 17 00:00:00 2001 From: "Fotis Koutoulakis (@NlightNFotis)" Date: Wed, 11 Dec 2024 11:32:53 +0000 Subject: [PATCH] feat: change wording of error reporting when a failure occurs during extraction --- lib/tools-download.js | 4 ++-- lib/tools-download.js.map | 2 +- src/tools-download.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/tools-download.js b/lib/tools-download.js index 9d6c862119..4655f2b00e 100644 --- a/lib/tools-download.js +++ b/lib/tools-download.js @@ -91,8 +91,8 @@ async function downloadAndExtract(codeqlURL, dest, authorization, headers, tarVe } } catch (e) { - core.warning(`Failed to download and extract CodeQL bundle using streaming. Falling back to downloading the bundle before extracting.`); - core.warning(`Error: ${(0, util_1.getErrorMessage)(e)}`); + core.warning(`Failed to download and extract CodeQL bundle using streaming with error: ${(0, util_1.getErrorMessage)(e)}`); + core.warning(`Falling back to downloading the bundle before extracting.`); // If we failed during processing, we want to clean up the destination directory // before we try again. await (0, util_1.cleanUpGlob)(dest, "CodeQL bundle", logger); diff --git a/lib/tools-download.js.map b/lib/tools-download.js.map index efb8b28937..c9b5ad0c1b 100644 --- a/lib/tools-download.js.map +++ b/lib/tools-download.js.map @@ -1 +1 @@ -{"version":3,"file":"tools-download.js","sourceRoot":"","sources":["../src/tools-download.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,gDAmGC;AA8CD,sDAOC;AAED,4DAOC;AAnPD,uCAAyB;AAEzB,uCAAyB;AACzB,2CAA6B;AAC7B,2CAAyC;AAEzC,oDAAsC;AACtC,sDAAkD;AAClD,+DAAiD;AACjD,uDAAyC;AACzC,+CAAiC;AAEjC,uCAAmD;AACnD,2CAA6B;AAC7B,iCAA2E;AAE3E;;GAEG;AACU,QAAA,8BAA8B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AAEvE;;GAEG;AACH,MAAM,mBA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AqB,CAAC,OAAe;IACnD,OAAO,IAAI,CAAC,IAAI,CACd,IAAA,0BAAmB,EAAC,mBAAmB,CAAC,EACxC,mBAAmB,EACnB,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,EAChC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAChB,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB,CACtC,aAAqB,EACrB,MAAc;IAEd,MAAM,cAAc,GAAG,GAAG,aAAa,WAAW,CAAC;IACnD,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,CAAC,IAAI,CAAC,iCAAiC,cAAc,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,0BAA0B,CAAC,GAAW;IAC7C,OAAO,CAAC,sBAAsB,EAAE,kCAAkC,CAAC,CAAC,IAAI,CACtE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,sBAAsB,IAAI,qBAAqB,CAAC,CAC1E;QACC,CAAC,CAAC,GAAG;QACL,CAAC,CAAC,iBAAiB,CAAC;AACxB,CAAC"} \ No newline at end of file +{"version":3,"file":"tools-download.js","sourceRoot":"","sources":["../src/tools-download.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA,gDAmGC;AA8CD,sDAOC;AAED,4DAOC;AAnPD,uCAAyB;AAEzB,uCAAyB;AACzB,2CAA6B;AAC7B,2CAAyC;AAEzC,oDAAsC;AACtC,sDAAkD;AAClD,+DAAiD;AACjD,uDAAyC;AACzC,+CAAiC;AAEjC,uCAAmD;AACnD,2CAA6B;AAC7B,iCAA2E;AAE3E;;GAEG;AACU,QAAA,8BAA8B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AAEvE;;GAEG;AACH,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AAarC,SAAS,uCAAuC,CAC9C,kBAA0B,EAC1B,o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AAC,mBAAmB,CAAC,EACxC,mBAAmB,EACnB,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,OAAO,EAChC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAChB,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB,CACtC,aAAqB,EACrB,MAAc;IAEd,MAAM,cAAc,GAAG,GAAG,aAAa,WAAW,CAAC;IACnD,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IACrC,MAAM,CAAC,IAAI,CAAC,iCAAiC,cAAc,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,0BAA0B,CAAC,GAAW;IAC7C,OAAO,CAAC,sBAAsB,EAAE,kCAAkC,CAAC,CAAC,IAAI,CACtE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,sBAAsB,IAAI,qBAAqB,CAAC,CAC1E;QACC,CAAC,CAAC,GAAG;QACL,CAAC,CAAC,iBAAiB,CAAC;AACxB,CAAC"} \ No newline at end of file diff --git a/src/tools-download.ts b/src/tools-download.ts index 8f627b407d..ce511663a5 100644 --- a/src/tools-download.ts +++ b/src/tools-download.ts @@ -125,9 +125,9 @@ export async function downloadAndExtract( } } catch (e) { core.warning( - `Failed to download and extract CodeQL bundle using streaming. Falling back to downloading the bundle before extracting.`, + `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}`, ); - core.warning(`Error: ${getErrorMessage(e)}`); + core.warning(`Falling back to downloading the bundle before extracting.`); // If we failed during processing, we want to clean up the destination directory // before we try again.