fix: update apt only if the number of repositories is not 0

This commit is contained in:
Amin Yahyaabadi 2022-07-27 16:49:25 -07:00
parent e5c77ec118
commit 4e84885253
5 changed files with 5 additions and 5 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

2
dist/setup_cpp.mjs 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

@ -34,7 +34,7 @@ export function setupAptPack(
didInit = true
}
if (Array.isArray(repositories)) {
if (Array.isArray(repositories) && repositories.length !== 0) {
for (const repo of repositories) {
// eslint-disable-next-line no-await-in-loop
execSudo("add-apt-repository", ["--update", "-y", repo])