Curl CLI installation fails when using ZSH Curl CLI installation fails when using ZSH

Curl CLI installation fails when using ZSH

Joel Watson Joel Watson

If you're attempting to install the CLI via the curl installation method below:

curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh | sudo sh

the installation may fail with output similar to the following:

➜  ~ curl -Ls https://cli.doppler.com/install.sh | sudo sh
Password:
[1] + 16103 done curl -Ls https://cli.doppler.com/install.sh |
16104 suspended (tty input) sudo sh

This appears to be an idiosyncrasy with ZSH when piping to sudo. You can work around this via a few possible ways.

Option 1: Install via Homebrew

You can install the CLI via Homebrew using:

brew install dopplerhq/cli/doppler

After installing, you can keep the CLI up-to-date using doppler update.

Option 2: Execute in Bash

You can open a bash shell by running bash and then run the command. This will avoid the ZSH behavior. When you're done installing, just ctrl-d to exit the Bash shell session and you'll be back in your ZSH shell with the Doppler CLI installed.

Option 3: Cache sudo prompt

You can run another command using sudo and this will briefly cache, which will allow the installation command to run correctly. Try running sudo echo "hello" followed by the curl installation command.

Was this article helpful?

0 out of 0 found this helpful