Skip to content

[rush] Slightly wrong text formatting for script warning box #5682

Open

Description

@kgetz-arista

Summary

Best explained with a screenshot I think:

Image

Repro steps

  1. Upgrade Rush to 5.169.3 and upgrade pnpm to 10.30.3
  2. Run rush update

Details

Something is wrong with the text formatting and causes one line to run too long and be mismatched with everything else.

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.169.3
rushVersion from rush.json? 5.169.3
pnpmVersion, npmVersion, or yarnVersion from rush.json? 10.30.3
(if pnpm) useWorkspaces from pnpm-config.json? true
Operating system? Windows 11
Would you consider contributing a PR? No
Node.js version (node -v)? 24.12.0

Activity

  1. kgetz-arista commented on Jun 30, 2026

    @kgetz-arista
    Author

    Still seeing this in the latest version of Rush:

    13:54:32  ╭ Warning ─────────────────────────────────────────────────────────────────────╮
    13:54:32  │                                                                              │
    13:54:32  │   Ignored build scripts: rs-module-lexer@2.8.0.                              │
    13:54:32  │   Run "rush-pnpm --subspace default approve-builds" to pick which dependencies should be allowed     │
    13:54:32  │   to run scripts.                                                            │
    13:54:32  │                                                                              │
    13:54:32  ╰──────────────────────────────────────────────────────────────────────────────╯
    13:54:32  Done in 1m 40.4s using pnpm v10.32.1
    
  2. Kevuhn commented on Nov 18, 2026

    @Kevuhn

    Hi, I'd like to work on this if it is still relevant.

    I checked and i can reproduce the issue on rush version 5.182.0 and pnpm 10.32.1 on Windows, in a fresh rush init repo with one project that depends on rs-module-lexer@2.8.0.

    image

    I think the cause is in libraries/rush-lib/src/logic/installManager/WorkspaceInstallManager.ts where pnpm approve-builds is replaced with rush-pnpm --subspace <name> approve-builds the extra characters aren't accounted for in pnpm's padding, so that line runs past the edge of the box.

    Proposed fix:

    • When the replaced text is inside a box row (a line that starts and ends with │), remove trailing spaces before the closing │ to make up for the added length.
    • If there isn't enough padding, re-wrap the text to the box's original width and add rows as needed.

    This is my first time contributing to open source so let me know if there is anything I am missing, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions