Skip to content

Commit 25c9275

Browse files
committed
fix
1 parent b1826d2 commit 25c9275

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/build_component.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,17 @@ jobs:
8282
idf_targets="${{ inputs.idf_targets }}"
8383
fi
8484
85-
# Convert comma-separated strings to JSON arrays
86-
idf_ver_json=$(echo "$idf_ver" | tr ',' '\n' | jq -R . | jq -s .)
87-
idf_targets_json=$(echo "$idf_targets" | tr ',' '\n' | jq -R . | jq -s .)
85+
# Convert comma-separated strings to JSON arrays using a more robust method
86+
idf_ver_json=$(printf '%s\n' "$idf_ver" | tr ',' '\n' | jq -R . | jq -s . | jq -c .)
87+
idf_targets_json=$(printf '%s\n' "$idf_targets" | tr ',' '\n' | jq -R . | jq -s . | jq -c .)
8888
89-
# Set outputs
90-
echo "idf_ver=$idf_ver_json" >> $GITHUB_OUTPUT
91-
echo "idf_target=$idf_targets_json" >> $GITHUB_OUTPUT
89+
# Debug: Print the JSON for verification
90+
echo "Debug - idf_ver_json: $idf_ver_json"
91+
echo "Debug - idf_targets_json: $idf_targets_json"
92+
93+
# Set outputs - ensure no extra whitespace
94+
printf "idf_ver=%s\n" "$idf_ver_json" >> $GITHUB_OUTPUT
95+
printf "idf_target=%s\n" "$idf_targets_json" >> $GITHUB_OUTPUT
9296
9397
build-esp-idf-component:
9498
name: Build IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }}

0 commit comments

Comments
 (0)