Skip to content

Commit 2b2cd37

Browse files
committed
Fix update-github-issue step: add error handling and jq check
- Add set -e at start of run section for error handling - Add jq availability check (should be pre-installed in ubuntu-latest) - Add if condition to only run when preprocess succeeds - Fixes exit code 127 error in workflow run
1 parent df95fa1 commit 2b2cd37

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,24 @@ 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
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+
211+
set -e # Exit on error
212+
213+
# Ensure jq is available (should be pre-installed in ubuntu-latest)
214+
if ! command -v jq &> /dev/null; then
215+
echo "⚠️ jq not found, installing..."
216+
sudo apt-get update && sudo apt-get install -y jq
217+
fi
218+
219+
202220
ENHANCED_TASK=$(echo "$TASK_JSON" | jq -r '.enhanced // empty')
203221
ORIGINAL_TASK=$(echo "$TASK_JSON" | jq -r '.original // empty')
204222
else

0 commit comments

Comments
 (0)