build: unset $TMUX when running tests (#34178)

This prevents Nvim TUI running in tests from thinking it's inside tmux.

Another solution is make :terminal unset $TMUX instead, but I'm not sure
if that'll break some other use cases.
This commit is contained in:
zeertzjq
2025-05-27 07:47:28 +08:00
committed by GitHub
parent a2daa3c0c0
commit 092e49d020

View File

@ -7,6 +7,7 @@ set(ENV{XDG_DATA_HOME} ${BUILD_DIR}/Xtest_xdg/share)
set(ENV{XDG_STATE_HOME} ${BUILD_DIR}/Xtest_xdg/state) set(ENV{XDG_STATE_HOME} ${BUILD_DIR}/Xtest_xdg/state)
unset(ENV{XDG_DATA_DIRS}) unset(ENV{XDG_DATA_DIRS})
unset(ENV{NVIM}) # Clear $NVIM in case tests are running from Nvim. #11009 unset(ENV{NVIM}) # Clear $NVIM in case tests are running from Nvim. #11009
unset(ENV{TMUX}) # Nvim TUI shouldn't think it's running in tmux. #34173
# TODO(dundargoc): The CIRRUS_CI environment variable isn't passed to here from # TODO(dundargoc): The CIRRUS_CI environment variable isn't passed to here from
# the main CMakeLists.txt, so we have to manually pass it to this script and # the main CMakeLists.txt, so we have to manually pass it to this script and