File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 44 pull_request :
55 paths :
66 - ' docs/**'
7+ - ' install'
78 - ' .github/workflows/docs-preview.yml'
89
910permissions :
Original file line number Diff line number Diff line change @@ -89,9 +89,11 @@ Options:
8989Environment Variables:
9090 SENTRY_INSTALL_DIR Override the installation directory
9191 SENTRY_VERSION Install a specific version (e.g., 0.19.0, nightly)
92+ SENTRY_INIT Set to 1 to run \` sentry init\` after installing
9293
9394Examples:
9495 curl -fsSL https://cli.sentry.dev/install | bash
96+ curl -fsSL https://cli.sentry.dev/install | SENTRY_INIT=1 bash
9597 curl -fsSL https://cli.sentry.dev/install | bash -s -- --version nightly
9698 curl -fsSL https://cli.sentry.dev/install | bash -s -- --version 0.19.0
9799 SENTRY_VERSION=nightly curl -fsSL https://cli.sentry.dev/install | bash
@@ -276,3 +278,19 @@ trap - EXIT
276278
277279# shellcheck disable=SC2086
278280" $tmp_binary " cli setup $setup_args
281+
282+ # Optionally launch the setup wizard after install.
283+ # </dev/tty reopens stdin from the terminal since `curl | bash` consumes it.
284+ if [[ " ${SENTRY_INIT:- } " == " 1" ]]; then
285+ sentry_bin=" "
286+ for dir in " ${SENTRY_INSTALL_DIR:- } " " $HOME /.local/bin" " $HOME /bin" " $HOME /.sentry/bin" ; do
287+ if [[ -x " ${dir} /sentry" ]]; then
288+ sentry_bin=" ${dir} /sentry"
289+ break
290+ fi
291+ done
292+ if [[ -z " $sentry_bin " ]]; then
293+ die " Cannot find installed sentry binary" " init"
294+ fi
295+ " $sentry_bin " init < /dev/tty
296+ fi
You can’t perform that action at this time.
0 commit comments