Skip to content

Commit 45b7d2c

Browse files
committed
CI: Ensure finding no pattern match results in an empty string
If no pattern match is found, which we expect for Qt x86 builds, then return an empty string by enabling the nullglob option. Additionally, add quotes for paths for safety and fix the for loop array syntax.
1 parent 077abdb commit 45b7d2c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/main.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ jobs:
607607
run: |
608608
: Package Windows dependencies
609609
shopt -s extglob
610+
shopt -s nullglob
610611
611612
for arch in x64 x86; do
612613
_temp=$(mktemp -d)
@@ -624,8 +625,8 @@ jobs:
624625
mv windows-deps-${{ steps.metadata.outputs.version }}-${arch}.zip ${GITHUB_WORKSPACE}
625626
626627
files=("${GITHUB_WORKSPACE}"/qt6-windows-"${arch}"-!(*-@(Debug|RelWithDebInfo|Release|MinSizeRel))/*.zip)
627-
for artifact in ${files}; do
628-
mv ${artifact} ${GITHUB_WORKSPACE}
628+
for artifact in "${files[@]}"; do
629+
mv "${artifact}" "${GITHUB_WORKSPACE}"
629630
done
630631
popd > /dev/null
631632
done

0 commit comments

Comments
 (0)