From 6665982caad9416c5a5b28b5069f21129a0e172d Mon Sep 17 00:00:00 2001 From: Mihai Stancu Date: Mon, 12 Jan 2026 13:17:15 +0200 Subject: [PATCH] Docker environments may not have package lists --- apt-bundle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apt-bundle b/apt-bundle index 5669adf..468fb6d 100755 --- a/apt-bundle +++ b/apt-bundle @@ -91,6 +91,11 @@ main() { printf "%s\0" "$file" done > "$TmpDir/packages" + # Docker environments may not have package lists + if [ -z "$(ls -A /var/lib/apt/lists 2>/dev/null)" ]; then + apt update -qyy; + fi + if [ -s "$TmpDir/packages" ]; then echo "installing necessary packages" xrun apt install -y < "$TmpDir/packages"