mirror of https://github.com/aminya/setup-cpp
fix: use strip-components 0 in extractTarByExe
This commit is contained in:
parent
1e1a2c7082
commit
eb3db26bf7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -20,9 +20,7 @@ function getKcovPackageInfo(version: string): PackageInfo {
|
|||
extractedFolderName: "",
|
||||
binRelativeDir: "usr/local/bin",
|
||||
binFileName: addBinExtension("kcov"),
|
||||
extractFunction: (file: string, dest: string) => {
|
||||
return extractTarByExe(file, dest, ["--strip-components=0"])
|
||||
},
|
||||
extractFunction: extractTarByExe,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
|
|
|
@ -231,7 +231,12 @@ async function getLLVMPackageInfo(version: string, platform: NodeJS.Platform, _a
|
|||
extractedFolderName: "",
|
||||
binRelativeDir: "bin",
|
||||
binFileName: addBinExtension("clang"),
|
||||
extractFunction: platform === "win32" ? extractExe : extractTarByExe,
|
||||
extractFunction:
|
||||
platform === "win32"
|
||||
? extractExe
|
||||
: (file: string, dest: string) => {
|
||||
return extractTarByExe(file, dest, ["--strip-components=1"])
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ export async function extractExe(file: string, dest: string) {
|
|||
return dest
|
||||
}
|
||||
|
||||
export async function extractTarByExe(file: string, dest: string, flags = ["--strip-components=1"]) {
|
||||
export async function extractTarByExe(file: string, dest: string, flags = ["--strip-components=0"]) {
|
||||
try {
|
||||
await mkdirP(dest)
|
||||
} catch {
|
||||
|
|
Loading…
Reference in New Issue