fix: install jq on demand when resolving the latest version #9

Merged
David merged 1 commit from fix/ensure-jq into main 2026-06-14 02:03:20 +02:00
Owner

Install jq on demand so the "latest" version path works on images without it.

Resolving nushell-version: latest pipes the GitHub releases API through jq. The openSUSE base runner does not ship jq, so the lookup failed. Add an ensure_jq helper that installs jq through whichever package manager is present (zypper, apt-get, apk, dnf) and is a no-op when jq already exists, so it complements baking jq into the base image rather than duplicating it. It runs only on the latest path; pinned versions never invoke jq.

Tested: sh -n parses clean.

Install jq on demand so the "latest" version path works on images without it. Resolving nushell-version: latest pipes the GitHub releases API through jq. The openSUSE base runner does not ship jq, so the lookup failed. Add an ensure_jq helper that installs jq through whichever package manager is present (zypper, apt-get, apk, dnf) and is a no-op when jq already exists, so it complements baking jq into the base image rather than duplicating it. It runs only on the latest path; pinned versions never invoke jq. Tested: sh -n parses clean.
fix: install jq on demand when resolving the latest version
All checks were successful
Test / Install Nushell 0.100.0 (pull_request) Successful in 5s
Test / Install Nushell 0.101.0 (pull_request) Successful in 8s
Test / Install Nushell 0.101.0 (push) Successful in 19s
Test / Install Nushell 0.100.0 (push) Successful in 22s
Test / Install Nushell latest (pull_request) Successful in 18s
Test / Install Nushell latest (push) Successful in 27s
cfbb912a7a
The "latest" version path pipes the GitHub releases API through jq, but some images (the openSUSE base runner) do not ship jq, so the lookup failed. Add an ensure_jq helper that installs jq via whichever package manager is present (zypper, apt-get, apk, dnf) and is a no-op when jq already exists. Call it only on the latest path, since pinned versions do not need jq.
David merged commit bcc2b98eab into main 2026-06-14 02:03:20 +02:00
David deleted branch fix/ensure-jq 2026-06-14 02:03:20 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/action-install-nushell!9
No description provided.