Skip to content

Commit e39bb30

Browse files
committed
Harden reusable-manage-labels Extra Commands parsing
1 parent 8680948 commit e39bb30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/reusable-manage-labels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
id: get-commands
3333
if: steps.check_composer_file.outputs.files_exists == 'true'
3434
run: |
35-
# Extract commands from composer.json using composer config
36-
COMMANDS=$(composer config extra.commands 2>/dev/null || echo "[]")
35+
# Extract commands from composer.json safely using jq
36+
COMMANDS=$(jq -c '.extra.commands // []' composer.json)
3737
echo "commands=${COMMANDS}" >> "$GITHUB_OUTPUT"
3838
echo "Commands found: ${COMMANDS}"
3939

0 commit comments

Comments
 (0)