Skip to content

Commit 49f8b19

Browse files
committed
Add error handling and jq check to update-github-issue step
- Add set -e for error handling - Add jq availability check (should be pre-installed) - Fixes exit code 127 error
1 parent df95fa1 commit 49f8b19

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/feature-request-enhance.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@ jobs:
199199
TASK_JSON="${{ needs.preprocess.outputs.task_json }}"
200200
if [ -n "$TASK_JSON" ] && [ "$TASK_JSON" != "null" ]; then
201201
# Extract values from JSON using jq
202+
set -e # Exit on error
203+
204+
# Ensure jq is available (should be pre-installed in ubuntu-latest)
205+
if ! command -v jq &> /dev/null; then
206+
echo "⚠️ jq not found, installing..."
207+
sudo apt-get update && sudo apt-get install -y jq
208+
fi
209+
210+
202211
ENHANCED_TASK=$(echo "$TASK_JSON" | jq -r '.enhanced // empty')
203212
ORIGINAL_TASK=$(echo "$TASK_JSON" | jq -r '.original // empty')
204213
else

0 commit comments

Comments
 (0)