mirror of https://github.com/aminya/setup-cpp
fix: update apt repositories in the beginning
This commit is contained in:
parent
de8de27990
commit
2c63db7e3c
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -15,6 +15,11 @@ export async function setupAptPack(
|
|||
|
||||
process.env.DEBIAN_FRONTEND = "noninteractive"
|
||||
|
||||
if (!didUpdate) {
|
||||
await execaSudo(apt, ["update", "-y"])
|
||||
didUpdate = true
|
||||
}
|
||||
|
||||
if (!didInit) {
|
||||
// install apt utils and certificates (usually missing from docker containers)
|
||||
// set time - zone
|
||||
|
@ -37,11 +42,7 @@ export async function setupAptPack(
|
|||
// eslint-disable-next-line no-await-in-loop
|
||||
await execaSudo("add-apt-repository", ["--update", "-y", repo])
|
||||
}
|
||||
}
|
||||
|
||||
if (!didUpdate || repositories === true) {
|
||||
await execaSudo(apt, ["update", "-y"])
|
||||
didUpdate = true
|
||||
}
|
||||
|
||||
if (version !== undefined && version !== "") {
|
||||
|
|
Loading…
Reference in New Issue