Skip to content

Commit 2c63db7

Browse files
committed
fix: update apt repositories in the beginning
1 parent de8de27 commit 2c63db7

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/setup/setupAptPack.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export async function setupAptPack(
1515

1616
process.env.DEBIAN_FRONTEND = "noninteractive"
1717

18+
if (!didUpdate) {
19+
await execaSudo(apt, ["update", "-y"])
20+
didUpdate = true
21+
}
22+
1823
if (!didInit) {
1924
// install apt utils and certificates (usually missing from docker containers)
2025
// set time - zone
@@ -37,11 +42,7 @@ export async function setupAptPack(
3742
// eslint-disable-next-line no-await-in-loop
3843
await execaSudo("add-apt-repository", ["--update", "-y", repo])
3944
}
40-
}
41-
42-
if (!didUpdate || repositories === true) {
4345
await execaSudo(apt, ["update", "-y"])
44-
didUpdate = true
4546
}
4647

4748
if (version !== undefined && version !== "") {

0 commit comments

Comments
 (0)