Skip to content

Conversation

@Tobbe
Copy link
Member

@Tobbe Tobbe commented Oct 30, 2025

After the upgrade to NX v22 in #503 I started seeing this in the console when running git push

image

NX has introduced a new default TUI that seems to leak terminal control characters/codes when used in lefthook the way I use it. So I turn of the new TUI there.

@Tobbe Tobbe added this to the chore milestone Oct 30, 2025
@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 7eacb97
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/690321949d33180008b97c52

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Greptile Summary

Disabled NX's interactive TUI during lefthook pre-push hooks by setting NX_TUI=false environment variable. This prevents terminal control characters from leaking to the console output.

  • Added environment variable prefix to the build command in the pre-push hook
  • Change only affects the git hook execution context, not regular builds
  • Properly uses NX's documented configuration mechanism

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The change is minimal, well-scoped, and uses NX's documented environment variable mechanism. It only affects the git hook execution context and addresses a specific UI rendering issue without changing any build logic or functionality
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
lefthook.yml 5/5 Added NX_TUI=false to disable NX's interactive TUI during git hooks

Sequence Diagram

sequenceDiagram
    participant Developer
    participant Git
    participant Lefthook
    participant NX
    participant Build

    Developer->>Git: git push
    Git->>Lefthook: trigger pre-push hook
    Lefthook->>NX: NX_TUI=false yarn build
    Note over NX: TUI disabled via env var
    NX->>Build: run-many -t build
    Build-->>NX: build results (no TUI)
    NX-->>Lefthook: exit code
    Lefthook->>Lefthook: run lint, prettier, check
    Lefthook-->>Git: all checks passed
    Git->>Developer: push completed
Loading

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Tobbe Tobbe enabled auto-merge (squash) October 30, 2025 08:36
@Tobbe Tobbe merged commit ccff19f into main Oct 30, 2025
39 of 40 checks passed
@Tobbe Tobbe deleted the tobbe-fix-cli-garbage-nx-lefthook branch October 30, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants