Reconfigure catch block

This commit is contained in:
Sampark Sharma
2022-12-09 09:33:59 +00:00
committed by GitHub
parent d31c2dd88d
commit 7a532d03f4
3 changed files with 21 additions and 24 deletions

View File

@@ -127,6 +127,8 @@ async function getArgs(
type: string,
archivePath = ''
): Promise<string> {
let args: string
const tarPath = await getTarPath()
const tarArgs = await getTarArgs(
tarPath,
@@ -142,11 +144,18 @@ async function getArgs(
tarPath.type === ArchiveToolType.BSD &&
compressionMethod !== CompressionMethod.Gzip &&
IS_WINDOWS
if (BSD_TAR_ZSTD && type !== 'create') {
return [...compressionArgs, ...tarArgs].join(' ')
args = [...compressionArgs, ...tarArgs].join(' ')
} else {
return [...tarArgs, ...compressionArgs].join(' ')
args = [...tarArgs, ...compressionArgs].join(' ')
}
if (BSD_TAR_ZSTD) {
args = ['cmd /c "', args, '"'].join(' ')
}
return args
}
function getWorkingDirectory(): string {