fix: fix nala apt key addition

This commit is contained in:
Amin Yahyaabadi 2023-07-15 18:53:44 -07:00
parent 6326464ed5
commit 3a3a6aeea9
7 changed files with 8 additions and 7 deletions

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

View File

@ -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