From 057e1ecd3ddebbb6354661d4dbb5daa34a25a0b2 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 4 Oct 2024 19:18:31 +0100 Subject: [PATCH 1/3] Check zstd is on the path in addition to tar version --- lib/tar.js | 22 ++++++++++++++++++---- lib/tar.js.map | 2 +- src/tar.ts | 26 ++++++++++++++++++++++---- 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/lib/tar.js b/lib/tar.js index cfa2b820ef..77967f0957 100644 --- a/lib/tar.js +++ b/lib/tar.js @@ -40,6 +40,17 @@ const actions_util_1 = require("./actions-util"); const util_1 = require("./util"); const MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; const MIN_REQUIRED_GNU_TAR_VERSION = "1.31"; +async function isBinaryAccessible(binary, logger) { + try { + await (0, safe_which_1.safeWhich)(binary); + logger.debug(`Found ${binary}.`); + return true; + } + catch (e) { + logger.debug(`Could not find ${binary}: ${e}`); + return false; + } +} async function getTarVersion() { const tar = await (0, safe_which_1.safeWhich)("tar"); let stdout = ""; @@ -73,6 +84,7 @@ async function getTarVersion() { } } async function isZstdAvailable(logger) { + const foundZstdBinary = await isBinaryAccessible("zstd", logger); try { const tarVersion = await getTarVersion(); const { type, version } = tarVersion; @@ -80,12 +92,14 @@ async function isZstdAvailable(logger) { switch (type) { case "gnu": return { - available: version >= MIN_REQUIRED_GNU_TAR_VERSION, + available: foundZstdBinary && version >= MIN_REQUIRED_GNU_TAR_VERSION, + foundZstdBinary, version: tarVersion, }; case "bsd": return { - available: version >= MIN_REQUIRED_BSD_TAR_VERSION, + available: foundZstdBinary && version >= MIN_REQUIRED_BSD_TAR_VERSION, + foundZstdBinary, version: tarVersion, }; default: @@ -93,9 +107,9 @@ async function isZstdAvailable(logger) { } } catch (e) { - logger.error("Failed to determine tar version, therefore will assume zstd may not be available. " + + logger.warning("Failed to determine tar version, therefore will assume zstd may not be available. " + `The underlying error was: ${e}`); - return { available: false }; + return { available: false, foundZstdBinary }; } } async function extract(tarPath, compressionMethod, tarVersion, logger) { diff --git a/lib/tar.js.map b/lib/tar.js.map index a97bb69f66..27de3a8745 100644 --- a/lib/tar.js.map +++ b/lib/tar.js.map @@ -1 +1 @@ -{"version":3,"file":"tar.js","sourceRoot":"","sources":["../src/tar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DA,0CA4BC;AAID,0BAmBC;AASD,sCAyCC;AAQD,wDAKC;AA5KD,uCAAyB;AACzB,gDAAwB;AAExB,6DAA0D;AAC1D,+DAAiD;AACjD,uDAAmD;AACnD,+BAAoC;AAEpC,iDAAgE;AAEhE,iCAAkD;AAElD,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAO5C,KAAK,UAAU,aAAa;IAC1B,MAAM,GAAG,GAAG,MAAM,IAAA,sBAAS,EAAC,KAAK,CAAC,CAAC;IACnC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,QAAQ,GAAG,MAAM,IAAI,uBAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE;QACxD,SAAS,EAAE;YACT,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;gBACvB,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC5B,CAAC;SACF;KACF,CAAC,CAAC,IAAI,EAAE,CAAC;IACV,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IACD,oEAAoE;IACpE,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;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,KAAK,EAAE,GAAG,CAAC,CAAC;QACrC,CAAC;QAED,IAAI,UAAU,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;YAC9B,8EAA8E;YAC9E,IAAI,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACxC,MAAM,IAAA,sBAAO,EAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAA,kBAAW,EAAC,IAAI,EAAE,kCAAkC,EAAE,MAAM,CAAC,CAAC;QACpE,MAAM,CAAC,CAAC;IACV,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,mBAAmB;IAChC,MAAM,IAAI,GAAG,cAAI,CAAC,IAAI,CAAC,IAAA,oCAAqB,GAAE,EAAE,IAAA,SAAM,GAAE,CAAC,CAAC;IAC1D,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,sBAAsB,CAAC,OAAe;IACpD,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/src/tar.ts b/src/tar.ts index babf0c5b6f..404963435d 100644 --- a/src/tar.ts +++ b/src/tar.ts @@ -18,6 +18,20 @@ export type TarVersion = { version: string; }; +async function isBinaryAccessible( + binary: string, + logger: Logger, +): Promise { + try { + await safeWhich(binary); + logger.debug(`Found ${binary}.`); + return true; + } catch (e) { + logger.debug(`Could not find ${binary}: ${e}`); + return false; + } +} + async function getTarVersion(): Promise { const tar = await safeWhich("tar"); let stdout = ""; @@ -53,12 +67,14 @@ async function getTarVersion(): Promise { export interface ZstdAvailability { available: boolean; + foundZstdBinary: boolean; version?: TarVersion; } export async function isZstdAvailable( logger: Logger, ): Promise { + const foundZstdBinary = await isBinaryAccessible("zstd", logger); try { const tarVersion = await getTarVersion(); const { type, version } = tarVersion; @@ -66,23 +82,25 @@ export async function isZstdAvailable( switch (type) { case "gnu": return { - available: version >= MIN_REQUIRED_GNU_TAR_VERSION, + available: foundZstdBinary && version >= MIN_REQUIRED_GNU_TAR_VERSION, + foundZstdBinary, version: tarVersion, }; case "bsd": return { - available: version >= MIN_REQUIRED_BSD_TAR_VERSION, + available: foundZstdBinary && version >= MIN_REQUIRED_BSD_TAR_VERSION, + foundZstdBinary, version: tarVersion, }; default: assertNever(type); } } catch (e) { - logger.error( + logger.warning( "Failed to determine tar version, therefore will assume zstd may not be available. " + `The underlying error was: ${e}`, ); - return { available: false }; + return { available: false, foundZstdBinary }; } } From bf2e624d0b3b15a9fe5c6ae1294f207a8f2ee3f1 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 7 Oct 2024 10:25:25 +0100 Subject: [PATCH 2/3] Update src/tar.ts Co-authored-by: Andrew Eisenberg --- src/tar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tar.ts b/src/tar.ts index 404963435d..63fa8e928d 100644 --- a/src/tar.ts +++ b/src/tar.ts @@ -97,7 +97,7 @@ export async function isZstdAvailable( } } catch (e) { logger.warning( - "Failed to determine tar version, therefore will assume zstd may not be available. " + + "Failed to determine tar version, therefore will assume zstd is not available. " + `The underlying error was: ${e}`, ); return { available: false, foundZstdBinary }; From d65a17605a400f2b42f1e4785239bc63a91419b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 09:28:04 +0000 Subject: [PATCH 3/3] Rebuild --- lib/tar.js | 2 +- lib/tar.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tar.js b/lib/tar.js index 77967f0957..b67a40bb96 100644 --- a/lib/tar.js +++ b/lib/tar.js @@ -107,7 +107,7 @@ async function isZstdAvailable(logger) { } } catch (e) { - logger.warning("Failed to determine tar version, therefore will assume zstd may not be available. " + + logger.warning("Failed to determine tar version, therefore will assume zstd is not available. " + `The underlying error was: ${e}`); return { available: false, foundZstdBinary }; } diff --git a/lib/tar.js.map b/lib/tar.js.map index 27de3a8745..a48347f230 100644 --- a/lib/tar.js.map +++ b/lib/tar.js.map @@ -1 +1 @@ -{"version":3,"file":"tar.js","sourceRoot":"","sources":["../src/tar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,0CA+BC;AAID,0BAmBC;AASD,sCAyCC;AAQD,wDAKC;AA9LD,uCAAyB;AACzB,gDAAwB;AAExB,6DAA0D;AAC1D,+DAAiD;AACjD,uDAAmD;AACnD,+BAAoC;AAEpC,iDAAgE;AAEhE,iCAAkD;AAElD,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAO5C,KAAK,UAAU,kBAAkB,CAC/B,MAAc,EACd,MAAc;IAEd,IAAI,CAAC;QACH,MAAM,IAAA,sBAAS,EAAC,MAAM,CAAC,CAAC;QACxB,MAAM,CAAC,KAAK,CAAC,SAAS,MAAM,GAAG,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,KAAK,CAAC,kBAAkB,MAAM,KAAK,CAAC,EAAE,CAAC,CAAC;QAC/C,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,aAAa;IAC1B,MAAM,GAAG,GAAG,MAAM,IAAA,sBAAS,EAAC,KAAK,CAAC,CAAC;IACnC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,M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