Skip to content

Commit f675df5

Browse files
authored
chore(smoke-tests): try updating the package index first COMPASS-9405 (#6955)
Try updating the package index first
1 parent e81a89b commit f675df5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/compass-smoke-tests/src/installers/linux-deb.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ export function installLinuxDeb({
2525
execute('sudo', ['apt', 'remove', '--yes', '--purge', packageName]);
2626
}
2727

28-
console.warn(
29-
"Installing globally, since we haven't discovered a way to specify an install path"
30-
);
31-
3228
if (fs.existsSync(installPath)) {
3329
console.warn(
3430
'Found an existing install directory (likely from a previous run): Uninstalling first'
@@ -43,6 +39,9 @@ export function installLinuxDeb({
4339
console.warn(
4440
"Installing globally, since we haven't discovered a way to specify an install path"
4541
);
42+
// Update package index first to avoid fetching missing packages
43+
execute('sudo', ['apt-get', 'update']);
44+
// Using "apt" instead of "apt-get" to install dependencies
4645
execute('sudo', ['apt', 'install', filepath]);
4746

4847
assert(

0 commit comments

Comments
 (0)