Skip to content

Commit 695c9e5

Browse files
committed
Fixup
1 parent 4f32ce2 commit 695c9e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: ci/run-docker.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,16 @@ run() {
4848
build_args=(
4949
"--cache-from" "type=local,src=/tmp/.buildx-cache"
5050
"--cache-to" "type=local,dest=/tmp/.buildx-cache-new"
51-
"${build_args[@]:-}"
51+
# This is the beautiful bash syntax for expanding an array but neither
52+
# raising an error nor returning an empty string if the array is empty.
53+
"${build_args[@]:+"${build_args[@]}"}"
5254
"--load"
5355
)
5456
fi
5557

5658
docker "${build_cmd[@]:-build}" \
5759
-t "builtins-$target" \
58-
${build_args[@]:-} \
60+
"${build_args[@]:-}" \
5961
"ci/docker/$target"
6062
docker run \
6163
--rm \

0 commit comments

Comments
 (0)