From 6a9820e63787f22de947da40a1e60693ec8bd363 Mon Sep 17 00:00:00 2001 From: it-a-me <92066678+it-a-me@users.noreply.github.com> Date: Sat, 31 Aug 2024 13:13:41 -0700 Subject: [PATCH] scripts: Fix bundle-linux when RUSTFLAGS is unset (#17218) The install-linux script fails to build when the RUSTFLAGS environment variable is not set. Bash attempts to expand an empty variable and fails due to the prior set -u Closes #17217 Release Notes: - N/A --- script/bundle-linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/bundle-linux b/script/bundle-linux index 8ebe111945..029d748f4f 100755 --- a/script/bundle-linux +++ b/script/bundle-linux @@ -42,7 +42,7 @@ target_triple=${host_line#*: } script/generate-licenses # Build binary in release mode -export RUSTFLAGS="$RUSTFLAGS -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib" +export RUSTFLAGS="${RUSTFLAGS:-} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib" cargo build --release --target "${target_triple}" --package zed --package cli --package remote_server # Strip the binary of all debug symbols