Skip to content

fix(cli): strip CRLF error lines and trim final status token in addToWindowsUserPath - #2753

Merged
BYK merged 1 commit into
getsentry:mainfrom
Pybsama:fix/windows-path-crlf-and-status-trimming
Dec 4, 2026
Merged

BYK merged 1 commit into
getsentry:mainfrom
Pybsama:fix/windows-path-crlf-and-status-trimming

Conversation

@Pybsama

@Pybsama Pybsama commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Split PowerShell error messages on /\r?\n/ and select the first non-empty trimmed line in addToWindowsUserPath() (packages/cli/src/lib/windows-path.ts) so Windows CRLF line endings or leading blank lines do not leave stray \r characters or an empty reason in the returned message.
  • Trim whitespace around the final line of PowerShell output when checking "added" / "present" so multi-line output with leading/trailing spaces on the status line is still recognized.
  • Add regression tests in packages/cli/test/lib/windows-path.test.ts.

Verification

  • pnpm --filter sentry run lint (oxlint + oxfmt --check) — passed
  • pnpm --filter sentry run typecheck — passed
  • TZ=UTC ./node_modules/.bin/vitest run test/lib/windows-path.test.ts — passed
  • pnpm --filter @sentry/mcp-server run bundle (3810.8 KB) & test:bundle — 26/26 passed

…WindowsUserPath

Co-Authored-By: Antigravity <noreply@google.com>
@vercel

vercel Bot commented Dec 2, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Sentry Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
vercel Bot temporarily deployed to Preview – sentry-local December 2, 2026 05:10 Inactive
@vercel

vercel Bot commented Dec 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Dec 2, 2026 5:10am UTC

Request Review

@github-actions github-actions Bot added the risk: low PR risk score: low label Dec 2, 2026
@BYK
BYK enabled auto-merge December 4, 2026 06:58
@BYK
BYK added this pull request to the merge queue Dec 4, 2026
Merged via the queue into getsentry:main with commit ec94e22 Dec 4, 2026
27 of 28 checks passed

This branch was previously deployed

1 inactive deployment
Preview – sentry-local — 68937f48 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants