Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- 'src/**'
- 'script/generate-command-docs.ts'
- 'script/generate-skill.ts'
- 'install'
- '.github/workflows/docs-preview.yml'

permissions:
Expand Down
23 changes: 23 additions & 0 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ Options:
Environment Variables:
SENTRY_INSTALL_DIR Override the installation directory
SENTRY_VERSION Install a specific version (e.g., 0.19.0, nightly)
SENTRY_INIT Set to 1 to run \`sentry init\` after installing

Examples:
curl -fsSL https://cli.sentry.dev/install | bash
curl -fsSL https://cli.sentry.dev/install | SENTRY_INIT=1 bash
curl -fsSL https://cli.sentry.dev/install | bash -s -- --version nightly
curl -fsSL https://cli.sentry.dev/install | bash -s -- --version 0.19.0
SENTRY_VERSION=nightly curl -fsSL https://cli.sentry.dev/install | bash
Expand Down Expand Up @@ -276,3 +278,24 @@ trap - EXIT

# shellcheck disable=SC2086
"$tmp_binary" cli setup $setup_args

# Optionally launch the setup wizard after install.
# Reconnect stdin to the real terminal so the wizard can prompt
# interactively — when piped (curl | bash), stdin is the pipe.
if [[ "${SENTRY_INIT:-}" == "1" ]]; then
sentry_bin=""
for dir in "${SENTRY_INSTALL_DIR:-}" "$HOME/.local/bin" "$HOME/bin" "$HOME/.sentry/bin"; do
[[ -z "$dir" ]] && continue
if [[ -x "${dir}/sentry" ]]; then
sentry_bin="${dir}/sentry"
break
fi
done
if [[ -z "$sentry_bin" ]]; then
die "Cannot find installed sentry binary" "init"
fi
if [[ ! -e /dev/tty ]]; then
die "SENTRY_INIT=1 requires an interactive terminal (/dev/tty not available)" "init"
fi
exec "$sentry_bin" init </dev/tty
fi
Loading