Skip to content

Commit 81864f2

Browse files
committed
fix: properly handle command arguments
Signed-off-by: ZHANG Yuntian <yt@radxa.com>
1 parent f893c04 commit 81864f2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/actions/infra-repo-update/action.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ runs:
2222
shell: bash
2323
run: |
2424
if [[ -f pkg.conf.template ]]; then
25-
if [[ "${{ inputs.test-repo }}" == "true" ]]
25+
grep_arg=()
26+
if [[ "${{ inputs.test-repo }}" != "true" ]]
2627
then
27-
grep_arg=""
28-
else
29-
grep_arg="-v"
28+
grep_arg+=("-v")
3029
fi
3130
repo_suffix=""
3231
supported_distros=()
33-
mapfile -t supported_distros < <(jq -er '."*".Releases[]' pkg.conf.template | grep "$grep_arg" -- -test)
32+
mapfile -t supported_distros < <(jq -er '."*".Releases[]' pkg.conf.template | grep "${grep_arg[@]}" -- -test)
3433
else
3534
if [[ "${{ inputs.test-repo }}" == "true" ]]
3635
then

0 commit comments

Comments
 (0)