From e6e29846f21d19e4a9cd07debd48bb7dfdf85b93 Mon Sep 17 00:00:00 2001 From: Lovepreet Singh Date: Mon, 20 Feb 2023 19:03:44 +0000 Subject: [PATCH] Add debug statement for exact zstd version value and remove dependence on version for now --- packages/cache/src/internal/cacheUtils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cache/src/internal/cacheUtils.ts b/packages/cache/src/internal/cacheUtils.ts index ea69b7cc..650653ad 100644 --- a/packages/cache/src/internal/cacheUtils.ts +++ b/packages/cache/src/internal/cacheUtils.ts @@ -79,7 +79,7 @@ async function getVersion( additionalArgs.push('--version') core.debug(`Checking ${app} ${additionalArgs.join(' ')}`) try { - await exec.exec(`${app} `, additionalArgs, { + await exec.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, silent: true, listeners: { @@ -100,9 +100,9 @@ async function getVersion( export async function getCompressionMethod(): Promise { const versionOutput = await getVersion('zstd', ['--quiet']) const version = semver.clean(versionOutput) + core.debug(`zstd version: ${version}`) - if (versionOutput === '' || version === null) { - // zstd is not installed + if (versionOutput === '') { return CompressionMethod.Gzip } else { return CompressionMethod.ZstdWithoutLong