mirror of https://github.com/actions/toolkit
Fix order of args for tar
parent
e9e146bbf8
commit
5f89653f1b
|
@ -68,13 +68,14 @@ async function getCompressionProgram(compressionMethod: CompressionMethod): Prom
|
||||||
}
|
}
|
||||||
return [
|
return [
|
||||||
'--use-compress-program',
|
'--use-compress-program',
|
||||||
IS_WINDOWS ? 'zstd -d --long=30' : 'unzstd --long=30'
|
IS_WINDOWS ? 'zstd -d --long=30' : 'unzstd --long=30',
|
||||||
|
'-tf'
|
||||||
]
|
]
|
||||||
case CompressionMethod.ZstdWithoutLong:
|
case CompressionMethod.ZstdWithoutLong:
|
||||||
if (BSD_TAR_ZSTD) {
|
if (BSD_TAR_ZSTD) {
|
||||||
return ['a'] // auto-detect compression
|
return ['a'] // auto-detect compression
|
||||||
}
|
}
|
||||||
return ['--use-compress-program', IS_WINDOWS ? 'zstd -d' : 'unzstd']
|
return ['--use-compress-program', IS_WINDOWS ? 'zstd -d' : 'unzstd', '-tf']
|
||||||
default:
|
default:
|
||||||
return ['-z']
|
return ['-z']
|
||||||
}
|
}
|
||||||
|
@ -85,7 +86,6 @@ export async function listTar(
|
||||||
compressionMethod: CompressionMethod
|
compressionMethod: CompressionMethod
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const args = [
|
const args = [
|
||||||
'-tf',
|
|
||||||
...(await getCompressionProgram(compressionMethod)),
|
...(await getCompressionProgram(compressionMethod)),
|
||||||
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||||
'-P'
|
'-P'
|
||||||
|
@ -142,7 +142,8 @@ export async function createTar(
|
||||||
}
|
}
|
||||||
return [
|
return [
|
||||||
'--use-compress-program',
|
'--use-compress-program',
|
||||||
IS_WINDOWS ? 'zstd -T0 --long=30' : 'zstdmt --long=30'
|
IS_WINDOWS ? 'zstd -T0 --long=30' : 'zstdmt --long=30',
|
||||||
|
'-cf'
|
||||||
]
|
]
|
||||||
case CompressionMethod.ZstdWithoutLong:
|
case CompressionMethod.ZstdWithoutLong:
|
||||||
if (BSD_TAR_ZSTD) {
|
if (BSD_TAR_ZSTD) {
|
||||||
|
@ -150,7 +151,7 @@ export async function createTar(
|
||||||
'-O', '|', 'zstd -T0 -o'
|
'-O', '|', 'zstd -T0 -o'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
return ['--use-compress-program', IS_WINDOWS ? 'zstd -T0' : 'zstdmt']
|
return ['--use-compress-program', IS_WINDOWS ? 'zstd -T0' : 'zstdmt', '-cf']
|
||||||
default:
|
default:
|
||||||
return ['-z']
|
return ['-z']
|
||||||
}
|
}
|
||||||
|
@ -164,8 +165,6 @@ export async function createTar(
|
||||||
workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
workingDirectory.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||||
'--files-from',
|
'--files-from',
|
||||||
manifestFilename,
|
manifestFilename,
|
||||||
'-cf',
|
|
||||||
'-v',
|
|
||||||
...(await getCompressionProgram()),
|
...(await getCompressionProgram()),
|
||||||
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue