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"
|
process.env.DEBIAN_FRONTEND = "noninteractive"
|
||||||
|
|
||||||
|
if (!didUpdate) {
|
||||||
|
await execaSudo(apt, ["update", "-y"])
|
||||||
|
didUpdate = true
|
||||||
|
}
|
||||||
|
|
||||||
if (!didInit) {
|
if (!didInit) {
|
||||||
// install apt utils and certificates (usually missing from docker containers)
|
// install apt utils and certificates (usually missing from docker containers)
|
||||||
// set time - zone
|
// set time - zone
|
||||||
|
@ -37,11 +42,7 @@ export async function setupAptPack(
|
||||||
// eslint-disable-next-line no-await-in-loop
|
// eslint-disable-next-line no-await-in-loop
|
||||||
await execaSudo("add-apt-repository", ["--update", "-y", repo])
|
await execaSudo("add-apt-repository", ["--update", "-y", repo])
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!didUpdate || repositories === true) {
|
|
||||||
await execaSudo(apt, ["update", "-y"])
|
await execaSudo(apt, ["update", "-y"])
|
||||||
didUpdate = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version !== undefined && version !== "") {
|
if (version !== undefined && version !== "") {
|
||||||
|
|
Loading…
Reference in New Issue