From ebc053ff31f5aceb2ffdc7304c3da0f2dad659bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kr=C3=A6n=20Hansen?= Date: Fri, 23 May 2025 09:09:39 +0200 Subject: [PATCH] Try updating the package index first --- packages/compass-smoke-tests/src/installers/linux-deb.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/compass-smoke-tests/src/installers/linux-deb.ts b/packages/compass-smoke-tests/src/installers/linux-deb.ts index 8b55c17da1c..b4974241bec 100644 --- a/packages/compass-smoke-tests/src/installers/linux-deb.ts +++ b/packages/compass-smoke-tests/src/installers/linux-deb.ts @@ -25,10 +25,6 @@ export function installLinuxDeb({ execute('sudo', ['apt', 'remove', '--yes', '--purge', packageName]); } - console.warn( - "Installing globally, since we haven't discovered a way to specify an install path" - ); - if (fs.existsSync(installPath)) { console.warn( 'Found an existing install directory (likely from a previous run): Uninstalling first' @@ -43,6 +39,9 @@ export function installLinuxDeb({ console.warn( "Installing globally, since we haven't discovered a way to specify an install path" ); + // Update package index first to avoid fetching missing packages + execute('sudo', ['apt-get', 'update']); + // Using "apt" instead of "apt-get" to install dependencies execute('sudo', ['apt', 'install', filepath]); assert(