fix: fallback to nala-legacy if nala itself fails

This commit is contained in:
Amin Yahyaabadi 2022-07-27 16:47:55 -07:00
parent 36734c34c3
commit e5c77ec118
5 changed files with 11 additions and 7 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

@ -32,9 +32,13 @@ export function setupNala(version: string, _setupDir: string, _arch: string) {
`echo "deb http://deb.volian.org/volian/ scar main" | tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list`,
])
if (version !== "legacy") {
setupAptPack("nala", undefined, [], true)
} else {
try {
if (version !== "legacy") {
setupAptPack("nala", undefined, [], true)
} else {
setupAptPack("nala-legacy", undefined, [], true)
}
} catch (err) {
setupAptPack("nala-legacy", undefined, [], true)
}