fix: disable auto nala installation

This commit is contained in:
Amin Yahyaabadi 2022-07-27 16:33:47 -07:00
parent ba21b207ac
commit 7a90ebc5a0
6 changed files with 15 additions and 20 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

@ -43,7 +43,6 @@ import { addEnv } from "./utils/env/addEnv"
import { setupSevenZip } from "./sevenzip/sevenzip" import { setupSevenZip } from "./sevenzip/sevenzip"
import { setupGraphviz } from "./graphviz/graphviz" import { setupGraphviz } from "./graphviz/graphviz"
import { setupNala } from "./nala/nala" import { setupNala } from "./nala/nala"
import { isUbuntu } from "./utils/env/isUbuntu"
/** The setup functions */ /** The setup functions */
const setups = { const setups = {
@ -155,14 +154,16 @@ export async function main(args: string[]): Promise<number> {
return 1 return 1
} }
if (isUbuntu()) { // https://gitlab.com/volian/nala/-/issues/115
try { //
setupNala(getVersion("nala", undefined, osVersion), "", arch) // if (isUbuntu()) {
} catch (err) { // try {
warning((err as Error).toString()) // setupNala(getVersion("nala", undefined, osVersion), "", arch)
// continue with apt-get // } catch (err) {
} // warning((err as Error).toString())
} // // continue with apt-get
// }
// }
// loop over the tools and run their setup function // loop over the tools and run their setup function
for (const tool of tools) { for (const tool of tools) {

View File

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