Skip to content

Commit 20d9bed

Browse files
bjordiscollakusimonbeaudoin0935
authored andcommitted
Ensure jq is installed before processing package-manifest.json in build-ubuntu-rootfs.sh
- Added a check and silent installation step for jq at the start of the script. - Prevents failures when handling package-manifest.json if jq is missing. Signed-off-by: Bjordis Collaku <[email protected]>
1 parent dd90a1a commit 20d9bed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

rootfs/scripts/build-ubuntu-rootfs.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,14 @@ esac
269269
# ==============================================================================
270270
# Step 3.5: Add custom apt sources from manifest (if provided)
271271
# ==============================================================================
272+
273+
# Ensure jq is installed before processing package-manifest.json
274+
if ! command -v jq &> /dev/null; then
275+
echo "jq not found. Installing jq..."
276+
apt-get update -qq
277+
apt-get install -y -qq jq
278+
fi
279+
272280
if [[ "$USE_MANIFEST" -eq 1 && -n "$MANIFEST" ]]; then
273281
echo "[INFO] Adding custom apt sources from manifest..."
274282
jq -c '.apt_sources[]?' "$MANIFEST" | while read -r row; do

0 commit comments

Comments
 (0)