mirror of https://github.com/aminya/setup-cpp
fix: add --fix-broken to apt
This commit is contained in:
parent
19ab22e7b5
commit
74bc447689
|
@ -26,12 +26,12 @@ export async function setupAptPack(
|
|||
|
||||
if (version !== undefined && version !== "") {
|
||||
try {
|
||||
await execaSudo(apt, ["install", "-y", `${name}=${version}`])
|
||||
await execaSudo(apt, ["install", "--fix-broken", "-y", `${name}=${version}`])
|
||||
} catch {
|
||||
await execaSudo(apt, ["install", "-y", `${name}-${version}`])
|
||||
await execaSudo(apt, ["install", "--fix-broken", "-y", `${name}-${version}`])
|
||||
}
|
||||
} else {
|
||||
await execaSudo(apt, ["install", "-y", name])
|
||||
await execaSudo(apt, ["install", "--fix-broken", "-y", name])
|
||||
}
|
||||
|
||||
return { binDir: "/usr/bin/" }
|
||||
|
|
Loading…
Reference in New Issue