fix: Enhance archive extraction command compatibility (#9860)

Refs #9856
This commit is contained in:
ssongliu 2025-08-05 16:14:59 +08:00 committed by GitHub
parent d74b41a5f2
commit 78e3d9e5fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -138,7 +138,7 @@ func HandleUnTar(sourceFile, targetDir string, secret string) error {
commands = fmt.Sprintf("%s tar -zxvf - -C %s", extraCmd, targetDir+" > /dev/null 2>&1")
global.LOG.Debug(strings.ReplaceAll(commands, fmt.Sprintf(" '%s' ", secret), " ****** "))
} else {
commands = fmt.Sprintf("tar zxvfC %s %s", sourceFile, targetDir)
commands = fmt.Sprintf("tar zxvf '%s' -C '%s'", sourceFile, targetDir)
global.LOG.Debug(commands)
}