fix: add --fix-broken to apt

This commit is contained in:
Amin Yahyaabadi 2021-12-07 07:15:34 -06:00
parent 19ab22e7b5
commit 74bc447689
1 changed files with 3 additions and 3 deletions

View File

@ -26,12 +26,12 @@ export async function setupAptPack(
if (version !== undefined && version !== "") { if (version !== undefined && version !== "") {
try { try {
await execaSudo(apt, ["install", "-y", `${name}=${version}`]) await execaSudo(apt, ["install", "--fix-broken", "-y", `${name}=${version}`])
} catch { } catch {
await execaSudo(apt, ["install", "-y", `${name}-${version}`]) await execaSudo(apt, ["install", "--fix-broken", "-y", `${name}-${version}`])
} }
} else { } else {
await execaSudo(apt, ["install", "-y", name]) await execaSudo(apt, ["install", "--fix-broken", "-y", name])
} }
return { binDir: "/usr/bin/" } return { binDir: "/usr/bin/" }