Skip to content

Commit ba21b20

Browse files
committed
fix: ignore the error of apt-key addition
1 parent 377be6c commit ba21b20

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/setup_cpp.mjs.map

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/nala/nala.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { dirname } from "path"
22
import which from "which"
33
import { isUbuntu } from "../utils/env/isUbuntu"
44
import { execSudo } from "../utils/exec/sudo"
5+
import { warning } from "../utils/io/io"
56
import { setupAptPack } from "../utils/setup/setupAptPack"
67

78
let binDir: string | undefined
@@ -22,7 +23,12 @@ export function setupNala(version: string, _setupDir: string, _arch: string) {
2223
}
2324

2425
// https://github.com/volitank/nala#-installation
25-
execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "A87015F3DA22D980"])
26+
try {
27+
execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "A87015F3DA22D980"])
28+
} catch (err) {
29+
// https://gitlab.com/volian/nala/-/issues/115
30+
warning((err as Error).toString())
31+
}
2632
execSudo("/bin/bash", [
2733
"-c",
2834
`echo "deb http://deb.volian.org/volian/ scar main" | tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list`,

0 commit comments

Comments
 (0)