Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tui): Set TURBO_IS_TUI environment variable when using TUI. (#8897)
### Description Tools being used inside Turborepo tasks may want to know if they are being ran in our multiplexer, similar to the way other terminal tooling set environment variables that other programs can read (e.g. `ZSH`,`TMUX`, `ALACRITTY_WINDOW_ID`). In this PR, we're exposing a `TURBO_IS_TUI` variable for this purpose. ### Testing Instructions Using the `with-shell-commands` example, I edited one of the `build` scripts to echo the value. With TUI: ``` TURBO_UI devturbo build --force --skip-infer <omitted for brevity> ┌ pkg-b#build > cache bypass, force executing 33b029c222753bd2 │ │ │ > pkg-b@ prebuild /Users/anthonyshew/projects/debugs/with-shell-commands/packages/pkg-b │ > echo "Executing pre-build step..." │ │ Executing pre-build step... │ │ > pkg-b@ build /Users/anthonyshew/projects/debugs/with-shell-commands/packages/pkg-b │ > echo $TURBO_IS_TUI │ │ true └────> ``` Without TUI: ``` TURBO_UI=0 devturbo build --force --skip-infer --filter=pkg-b turbo 2.0.11 • Packages in scope: pkg-b • Running build in 1 packages • Remote caching disabled pkg-b:prebuild: > echo "Executing pre-build step..." pkg-b:prebuild: pkg-b:prebuild: Executing pre-build step... pkg-b:build: cache bypass, force executing 33b029c222753bd2 pkg-b:build: pkg-b:build: pkg-b:build: > pkg-b@ prebuild /Users/anthonyshew/projects/debugs/with-shell-commands/packages/pkg-b pkg-b:build: > echo "Executing pre-build step..." pkg-b:build: pkg-b:build: Executing pre-build step... pkg-b:build: pkg-b:build: > pkg-b@ build /Users/anthonyshew/projects/debugs/with-shell-commands/packages/pkg-b pkg-b:build: > echo $TURBO_IS_TUI pkg-b:build: pkg-b:build: ```
- Loading branch information