From 377d62e8fe4cf4ad8458957a4edc45f7a105f266 Mon Sep 17 00:00:00 2001 From: Lawrence Chen Date: Wed, 18 Mar 2026 03:19:29 -0700 Subject: [PATCH] Fix empty env prefix in e2e workflow --- .github/workflows/test-e2e.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 6f651725..569f27c6 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -289,13 +289,22 @@ jobs: fi fi + XCODEBUILD_CMD=( + xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug + -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" + -disableAutomaticPackageResolution + -destination "platform=macOS" + -maximum-test-execution-time-allowance "$TEST_TIMEOUT" + $ONLY_TESTING + test + ) + set +e - OUTPUT=$(env "${DISPLAY_ENV_PREFIX[@]}" xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \ - -clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \ - -disableAutomaticPackageResolution \ - -destination "platform=macOS" \ - -maximum-test-execution-time-allowance "$TEST_TIMEOUT" \ - $ONLY_TESTING test 2>&1) + if [ "${#DISPLAY_ENV_PREFIX[@]}" -gt 0 ]; then + OUTPUT=$(env "${DISPLAY_ENV_PREFIX[@]}" "${XCODEBUILD_CMD[@]}" 2>&1) + else + OUTPUT=$("${XCODEBUILD_CMD[@]}" 2>&1) + fi EXIT_CODE=$? set -e