Skip to content

Commit 36734c3

Browse files
committed
fix: first add the key before adding the nala repository
1 parent 7a90ebc commit 36734c3

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
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/main.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import { addEnv } from "./utils/env/addEnv"
4343
import { setupSevenZip } from "./sevenzip/sevenzip"
4444
import { setupGraphviz } from "./graphviz/graphviz"
4545
import { setupNala } from "./nala/nala"
46+
import { isUbuntu } from "./utils/env/isUbuntu"
4647

4748
/** The setup functions */
4849
const setups = {
@@ -156,14 +157,14 @@ export async function main(args: string[]): Promise<number> {
156157

157158
// https://gitlab.com/volian/nala/-/issues/115
158159
//
159-
// if (isUbuntu()) {
160-
// try {
161-
// setupNala(getVersion("nala", undefined, osVersion), "", arch)
162-
// } catch (err) {
163-
// warning((err as Error).toString())
164-
// // continue with apt-get
165-
// }
166-
// }
160+
if (isUbuntu()) {
161+
try {
162+
setupNala(getVersion("nala", undefined, osVersion), "", arch)
163+
} catch (err) {
164+
warning((err as Error).toString())
165+
// continue with apt-get
166+
}
167+
}
167168

168169
// loop over the tools and run their setup function
169170
for (const tool of tools) {

src/nala/nala.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ export function setupNala(version: string, _setupDir: string, _arch: string) {
2222
}
2323

2424
// https://github.com/volitank/nala#-installation
25-
execSudo("apt-key", ["adv", "--keyserver", "keyserver.ubuntu.com", "--recv-keys", "A87015F3DA22D980"])
25+
setupAptPack("wget")
2626
execSudo("/bin/bash", [
2727
"-c",
28-
`echo "deb http://deb.volian.org/volian/ scar main" | tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list`,
28+
`wget -qO - https://deb.volian.org/volian/scar.key | tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null`,
2929
])
30-
setupAptPack("wget")
3130
execSudo("/bin/bash", [
3231
"-c",
33-
`wget -qO - https://deb.volian.org/volian/scar.key | tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null`,
32+
`echo "deb http://deb.volian.org/volian/ scar main" | tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list`,
3433
])
3534

3635
if (version !== "legacy") {

0 commit comments

Comments
 (0)