mirror of
https://github.com/actions/toolkit
synced 2025-05-10 17:12:54 +00:00
Add debug statement for exact zstd version value and remove dependence on version for now
This commit is contained in:
parent
7c15bf6f40
commit
e6e29846f2
1 changed files with 3 additions and 3 deletions
6
packages/cache/src/internal/cacheUtils.ts
vendored
6
packages/cache/src/internal/cacheUtils.ts
vendored
|
@ -79,7 +79,7 @@ async function getVersion(
|
||||||
additionalArgs.push('--version')
|
additionalArgs.push('--version')
|
||||||
core.debug(`Checking ${app} ${additionalArgs.join(' ')}`)
|
core.debug(`Checking ${app} ${additionalArgs.join(' ')}`)
|
||||||
try {
|
try {
|
||||||
await exec.exec(`${app} `, additionalArgs, {
|
await exec.exec(`${app}`, additionalArgs, {
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
silent: true,
|
silent: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
|
@ -100,9 +100,9 @@ async function getVersion(
|
||||||
export async function getCompressionMethod(): Promise<CompressionMethod> {
|
export async function getCompressionMethod(): Promise<CompressionMethod> {
|
||||||
const versionOutput = await getVersion('zstd', ['--quiet'])
|
const versionOutput = await getVersion('zstd', ['--quiet'])
|
||||||
const version = semver.clean(versionOutput)
|
const version = semver.clean(versionOutput)
|
||||||
|
core.debug(`zstd version: ${version}`)
|
||||||
|
|
||||||
if (versionOutput === '' || version === null) {
|
if (versionOutput === '') {
|
||||||
// zstd is not installed
|
|
||||||
return CompressionMethod.Gzip
|
return CompressionMethod.Gzip
|
||||||
} else {
|
} else {
|
||||||
return CompressionMethod.ZstdWithoutLong
|
return CompressionMethod.ZstdWithoutLong
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue