Skip to content

Commit 2e7f160

Browse files
committed
fix error handling
1 parent ff4f46e commit 2e7f160

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/actions/nx-affected-list/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ runs:
2121
id: affected
2222
shell: bash
2323
run: |
24+
set -euo pipefail
2425
ARGS=""
2526
if [ -n "${{ inputs.base }}" ]; then ARGS="$ARGS --base=${{ inputs.base }}"; fi
2627
if [ -n "${{ inputs.head }}" ]; then ARGS="$ARGS --head=${{ inputs.head }}"; fi
2728
28-
AFFECTED=$(./node_modules/.bin/nx show projects --affected $ARGS 2>/dev/null | tr '\n' ' ' | xargs) || true
29+
# Fail the step on nx/git errors so empty output cannot skip integration jobs silently.
30+
AFFECTED=$(./node_modules/.bin/nx show projects --affected $ARGS | tr '\n' ' ' | xargs)
2931
echo "affected=$AFFECTED" >> "$GITHUB_OUTPUT"
3032
3133
if [ -n "$AFFECTED" ]; then

0 commit comments

Comments
 (0)