mirror of https://github.com/aminya/setup-cpp
fix: fix nala apt key addition
This commit is contained in:
parent
6326464ed5
commit
3a3a6aeea9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -158,7 +158,8 @@ export async function addAptKeyViaDownload(name: string, url: string) {
|
||||||
if (!(await pathExists(fileName))) {
|
if (!(await pathExists(fileName))) {
|
||||||
initGpg()
|
initGpg()
|
||||||
await setupAptPack([{ name: "curl" }, { name: "ca-certificates" }], undefined)
|
await setupAptPack([{ name: "curl" }, { name: "ca-certificates" }], undefined)
|
||||||
execRootSync("bash", ["-c", `curl -s ${url} | gpg --no-default-keyring --keyring gnupg-ring:${fileName} --import`])
|
await execa("curl", ["-s", url, "-o", `/tmp/${name}`])
|
||||||
|
execRootSync("gpg", ["--no-default-keyring", "--keyring", `gnupg-ring:${fileName}`, "--import", `/tmp/${name}`])
|
||||||
execRootSync("chmod", ["644", fileName])
|
execRootSync("chmod", ["644", fileName])
|
||||||
}
|
}
|
||||||
return fileName
|
return fileName
|
||||||
|
|
Loading…
Reference in New Issue