@@ -83,18 +83,17 @@ Usage: install [options]
8383Options:
8484 -h, --help Display this help message
8585 -v, --version <version> Install a specific version (e.g., 0.2.0) or "nightly"
86- --init Run \` sentry init\` after installing
8786 --no-modify-path Don't modify shell config files (.zshrc, .bashrc, etc.)
8887 --no-completions Don't install shell completions
8988
9089Environment Variables:
9190 SENTRY_INSTALL_DIR Override the installation directory
9291 SENTRY_VERSION Install a specific version (e.g., 0.19.0, nightly)
93- SENTRY_INIT Same as -- init
92+ SENTRY_INIT Set to 1 to run \` sentry init\` after installing
9493
9594Examples:
9695 curl -fsSL https://cli.sentry.dev/install | bash
97- curl -fsSL https://cli.sentry.dev/install | bash -s -- --init
96+ curl -fsSL https://cli.sentry.dev/install | SENTRY_INIT=1 bash
9897 curl -fsSL https://cli.sentry.dev/install | bash -s -- --version nightly
9998 curl -fsSL https://cli.sentry.dev/install | bash -s -- --version 0.19.0
10099 SENTRY_VERSION=nightly curl -fsSL https://cli.sentry.dev/install | bash
105104requested_version=" ${SENTRY_VERSION:- } "
106105no_modify_path=false
107106no_completions=false
108- run_init=" ${SENTRY_INIT:- false} "
109107while [[ $# -gt 0 ]]; do
110108 case " $1 " in
111109 -h|--help) usage; exit 0 ;;
@@ -117,10 +115,6 @@ while [[ $# -gt 0 ]]; do
117115 die " Error: --version requires a version argument" " args"
118116 fi
119117 ;;
120- --init)
121- run_init=true
122- shift
123- ;;
124118 --no-modify-path)
125119 no_modify_path=true
126120 shift
@@ -289,7 +283,7 @@ trap - EXIT
289283# Resolve the installed binary path using the same logic as the TS code:
290284# SENTRY_INSTALL_DIR > ~/.local/bin > ~/bin > ~/.sentry/bin
291285# </dev/tty reopens stdin from the terminal since `curl | bash` consumes it.
292- if [[ " $run_init " == " true " || " $run_init " == " 1" ]]; then
286+ if [[ " ${SENTRY_INIT :- } " == " 1" ]]; then
293287 sentry_bin=" "
294288 for dir in " ${SENTRY_INSTALL_DIR:- } " " $HOME /.local/bin" " $HOME /bin" " $HOME /.sentry/bin" ; do
295289 if [[ -x " ${dir} /sentry" ]]; then
0 commit comments