Skip to content

Commit

Permalink
Fix error detection in bash command substitution (#17)
Browse files Browse the repository at this point in the history
GitHub Actions runs bash with `-e` by default, but because we were
combining the command substitution with an echo, the return code from
the subshell was ignored.

Capturing the command substitution explicitly should resolve the issue.
  • Loading branch information
cottsay authored Feb 7, 2024
1 parent 8b9d15d commit 2fec7d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- id: load
run: echo "strategy=$(jq -c -M '${{ inputs.matrix-filter }}' strategy.json)" >> $GITHUB_OUTPUT
run: |
strategy=$(jq -c -M '${{ inputs.matrix-filter }}' strategy.json)
echo "strategy=${strategy}" >> $GITHUB_OUTPUT
pytest:
needs: [setup]
Expand Down

0 comments on commit 2fec7d9

Please sign in to comment.