Skip to content

Commit

Permalink
Only install jq if necessary
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Howe <[email protected]>
  • Loading branch information
bmhowe23 committed Jan 14, 2025
1 parent 0ffe0de commit 2742a62
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/actions/get-cudaq-version/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ runs:

- name: Install jq
run: |
if [ -x "$(command -v apt-get)" ]; then
apt-get update
apt-get install -y --no-install-recommends jq
elif [ -x "$(command -v dnf)" ]; then
dnf install -y --nobest --setopt=install_weak_deps=False jq
if [ ! -x "$(command -v jq)" ]; then
if [ -x "$(command -v apt-get)" ]; then
apt-get update
apt-get install -y --no-install-recommends jq
elif [ -x "$(command -v dnf)" ]; then
dnf install -y --nobest --setopt=install_weak_deps=False jq
fi
fi
shell: bash
Expand Down

0 comments on commit 2742a62

Please sign in to comment.