fix: update apt repositories in the beginning

This commit is contained in:
Amin Yahyaabadi 2022-01-19 16:05:13 -08:00
parent de8de27990
commit 2c63db7e3c
3 changed files with 7 additions and 6 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

View File

@ -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 !== "") {