Skip to content

Commit f7d76fb

Browse files
Copilotwestonruter
andcommitted
Fix newline handling and optimize FILTER_OUTPUT evaluation
- Use echo -e for proper newline interpretation in filter generation - Move FILTER_OUTPUT assignment outside loop to avoid redundant evaluation Co-authored-by: westonruter <134745+westonruter@users.noreply.github.com>
1 parent daa67d4 commit f7d76fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/plugin-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
for plugin in $(jq -r '.plugins[]' plugins.json); do
4343
FILTERS="${FILTERS}${plugin}:\n - 'plugins/${plugin}/**'\n"
4444
done
45-
echo "$FILTERS" > /tmp/filters.yml
45+
echo -e "$FILTERS" > /tmp/filters.yml
4646
cat /tmp/filters.yml
4747
4848
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
@@ -54,9 +54,9 @@ jobs:
5454
id: filter-plugins
5555
run: |
5656
CHANGED_PLUGINS="[]"
57+
FILTER_OUTPUT="${{ toJson(steps.filter.outputs) }}"
5758
for plugin in $(jq -r '.plugins[]' plugins.json); do
5859
OUTPUT_KEY=$(echo "$plugin" | tr '-' '_')
59-
FILTER_OUTPUT="${{ toJson(steps.filter.outputs) }}"
6060
if echo "$FILTER_OUTPUT" | jq -e ".[\"$OUTPUT_KEY\"] == \"true\"" > /dev/null; then
6161
CHANGED_PLUGINS=$(echo "$CHANGED_PLUGINS" | jq -c --arg p "$plugin" '. + [$p]')
6262
fi

0 commit comments

Comments
 (0)