Skip to content

feat(cli): Add a sentry-cli that says it is now sentry to the installer - #2930

Merged
BYK merged 1 commit into
mainfrom
junior/cli-sentry-cli-installer-shim
Dec 5, 2026
Merged

BYK merged 1 commit into
mainfrom
junior/cli-sentry-cli-installer-shim

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

The get-cli installer (curl https://cli.sentry.dev/install | sh) puts only sentry on PATH, so v3 scripts that call sentry-cli fail with "command not found". The installer now also writes a POSIX sh sentry-cli next to sentry. It prints the same message as #2929 (the v4 binary run as sentry-cli, and PyPI's sentry-cli) and exits 1. It never runs sentry.

Before:

$ sentry-cli --version
sh: 1: sentry-cli: not found        # exit 127

After:

$ sentry-cli --version
Error: sentry-cli is now sentry. Sentry CLI v4 renamed the command and changed some commands and flags.
Update your scripts: https://cli.sentry.dev/migrating-from-v3/
Or stay on v3:
  npm:     npm install @sentry/cli@3
  pip:     pip install "sentry-cli<4"
  get-cli: curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=3.8.2 sh
                                    # exit 1
  • When another sentry-cli is on PATH or already in the install directory, the installer leaves it alone, so a real v3 install stays. A marker line lets a later install replace its own copy.
  • On glibc older than 2.28, install_v3 replaces the script before setup runs, so the real sentry-cli 3.8.2 is never overwritten.
  • The migration guide's sentry-cli function and alias still take priority over the file on PATH.
  • sentry cli uninstall does not remove the shim yet.

via @BYK.

--

View Session [Sentry]

v4's installer puts only `sentry` on PATH, so v3 scripts that call
`sentry-cli` exit 127 with "command not found". The installer now also
writes a POSIX sh `sentry-cli` next to `sentry`. It prints the same
message as the v4 binary run as `sentry-cli` and the PyPI `sentry-cli`
command (src/lib/sentry-cli-rename.ts), and exits 1. It never runs
`sentry`.

It is skipped when another `sentry-cli` is on PATH or already in the
install directory, so a real v3 install stays. A marker line lets a
later install replace its own copy. The old-glibc v3 fallback never
reaches it, because install_v3 replaces the script.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@sentry-junior
sentry-junior Bot requested a review from BYK December 5, 2026 05:51
@vercel

vercel Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Dec 5, 2026 5:51am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Dec 5, 2026 5:51am UTC

Request Review

@BYK
BYK added this pull request to the merge queue Dec 5, 2026
Merged via the queue into main with commit 751bdc3 Dec 5, 2026
40 checks passed
@BYK
BYK deleted the junior/cli-sentry-cli-installer-shim branch December 5, 2026 07:13

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 17337f3f Deployed Dec 5, 2026 by vercel[bot]
Preview – sentry-local — 17337f3f Deployed Dec 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant