Skip to content

Commit 46fd056

Browse files
amannocciclaude
andcommitted
fix: handle missing BUILD_DEPENDENCIES in diff output
The pipefail option causes the script to exit if grep finds no matches. Allow the pipeline to fail gracefully so BUILD_DEPENDENCIES can be empty if there are no new packages installed. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent 4e85c7c commit 46fd056

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/usr/src/install-ignity.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pkg::install "s6-portable-utils" "${S6_PORTABLE_UTILS_VERSION}" "${S6_PORTABLE_U
178178

179179
# Diff to do iso uninstall
180180
dpkg -l | awk '{print $2;}' > /tmp/after
181-
BUILD_DEPENDENCIES=$(diff /tmp/before /tmp/after | grep ">" | awk '{print $2;}')
181+
BUILD_DEPENDENCIES=$(diff /tmp/before /tmp/after | grep ">" | awk '{print $2;}' || true)
182182

183183
# Purge build dependencies and cleanup apt
184184
apt-get purge -y --auto-remove ${BUILD_DEPENDENCIES}

0 commit comments

Comments
 (0)