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: "",
|
extractedFolderName: "",
|
||||||
binRelativeDir: "usr/local/bin",
|
binRelativeDir: "usr/local/bin",
|
||||||
binFileName: addBinExtension("kcov"),
|
binFileName: addBinExtension("kcov"),
|
||||||
extractFunction: (file: string, dest: string) => {
|
extractFunction: extractTarByExe,
|
||||||
return extractTarByExe(file, dest, ["--strip-components=0"])
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -231,7 +231,12 @@ async function getLLVMPackageInfo(version: string, platform: NodeJS.Platform, _a
|
||||||
extractedFolderName: "",
|
extractedFolderName: "",
|
||||||
binRelativeDir: "bin",
|
binRelativeDir: "bin",
|
||||||
binFileName: addBinExtension("clang"),
|
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
|
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 {
|
try {
|
||||||
await mkdirP(dest)
|
await mkdirP(dest)
|
||||||
} catch {
|
} catch {
|
||||||
|
|
Loading…
Reference in New Issue