fix: ignore the error of apt-key addition

This commit is contained in:
Amin Yahyaabadi 2022-07-27 16:18:39 -07:00
parent 377be6c0a6
commit ba21b207ac
5 changed files with 11 additions and 5 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/setup_cpp.mjs vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,6 +2,7 @@ import { dirname } from "path"
import which from "which"
import { isUbuntu } from "../utils/env/isUbuntu"
import { execSudo } from "../utils/exec/sudo"
import { warning } from "../utils/io/io"
import { setupAptPack } from "../utils/setup/setupAptPack"
let binDir: string | undefined
@ -22,7 +23,12 @@ export function setupNala(version: string, _setupDir: string, _arch: string) {
}
// https://github.com/volitank/nala#-installation
execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "A87015F3DA22D980"])
try {
execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "A87015F3DA22D980"])
} catch (err) {
// https://gitlab.com/volian/nala/-/issues/115
warning((err as Error).toString())
}
execSudo("/bin/bash", [
"-c",
`echo "deb http://deb.volian.org/volian/ scar main" | tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list`,