about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2024-06-22 04:20:48 -0500
committerAmanieu d'Antras <amanieu@gmail.com>2024-06-22 16:15:46 +0200
commitfdec3b65142a95a3d7020d0160d926243cf8e81c (patch)
tree52d60aa5c86c839916dcd606001e02c059f5e0d7
parentb9507cc0f2344f62c2995eeb6486ac54a6e03632 (diff)
downloadrust-fdec3b65142a95a3d7020d0160d926243cf8e81c.tar.gz
rust-fdec3b65142a95a3d7020d0160d926243cf8e81c.zip
Fix unset variables in the build script
These were preventing building via Docker locally.
-rwxr-xr-xlibrary/compiler-builtins/ci/run-docker.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/compiler-builtins/ci/run-docker.sh b/library/compiler-builtins/ci/run-docker.sh
index aff3564732f..50ae9dc83a1 100755
--- a/library/compiler-builtins/ci/run-docker.sh
+++ b/library/compiler-builtins/ci/run-docker.sh
@@ -41,10 +41,10 @@ run() {
       export RUST_COMPILER_RT_ROOT=./compiler-rt
     fi
 
-    if [ "$GITHUB_ACTIONS" = "true" ]; then
+    if [ "${GITHUB_ACTIONS:-}" = "true" ]; then
       # Enable Docker image caching on GHA
       
-      buildx="buildx"
+      build_cmd=("buildx" "build")
       build_args=(
         "--cache-from" "type=local,src=/tmp/.buildx-cache"
         "--cache-to" "type=local,dest=/tmp/.buildx-cache-new"
@@ -53,7 +53,7 @@ run() {
       )
     fi
 
-    docker "${buildx:-}" build \
+    docker ${build_cmd[@]:-build} \
            -t "builtins-$target" \
            ${build_args[@]:-} \
            "ci/docker/$target"