mirror of https://github.com/aminya/setup-cpp
fix: update repositories independent of add-apt-repository
This commit is contained in:
parent
6925e1f02c
commit
6dade5cb0c
|
@ -15,11 +15,13 @@ export async function setupAptPack(
|
|||
|
||||
let exit = 0
|
||||
|
||||
if (typeof repository === "string") {
|
||||
exit = await exec(mightSudo("add-apt-repository"), ["--update", repository])
|
||||
}
|
||||
|
||||
if (!didUpdate || repository === true) {
|
||||
await exec(apt, ["update"])
|
||||
didUpdate = true
|
||||
} else if (typeof repository === "string") {
|
||||
exit = await exec(mightSudo("add-apt-repository"), ["--update", repository])
|
||||
}
|
||||
|
||||
exit = await exec(apt, ["install", version !== undefined && version !== "" ? `${name}=${version}` : name])
|
||||
|
|
Loading…
Reference in New Issue