Hyper: Hyper doesn't use default shell on MacOS

Created on 17 Feb 2020  路  9Comments  路  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate

Issue

Right out of the box, on macOS, Hyper still uses bash instead of the system default (which is now zsh). This causes the following annoying message to appear:

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.

Running the suggested command chsh -s /bin/zsh does nothing because it just changes the default system shell... which is already zsh! The issue is that Hyper is launching the bash shell by default, even though this isn't the system default. It can be easily fixed by changing the shell field in .hyper.js to be "/bin/zsh" but it would be nice if this worked out of the box!

馃槹 Can't Reproduce

Most helpful comment

Just to update anyone else who reads this, I had the same issue described above where $SHELL was correctly set to /bin/zsh on Terminal.app, but was still using /bin/bash on Hyper. For me it was fixed after fully logging out and back in again, simply opening a new terminal session did not work. I guess it could just be a bug with chsh.

All 9 comments

We use default-shell to get the default shell.
I'm getting zsh without setting shell in config
I'm using latest ci build, you can try it from here

I just installed the default-shell npm module in a standalone project directory and tried to see what its default shell is and I'm still getting /bin/bash!

  • default-shell version 1.0.1
  • node version 12.6.0

Hmm that's strange, I tried the same (default-shell separately) and I'm getting zsh, even when I start node from bash.
Can you try the steps from here (Do the From System Preferences step & just check your current login shell)

Also, which shell opens when you start the default Terminal.app?

zsh opens in my default terminal app. It's weird that the same issue isn't able to be replicated on your machine鈥攊t's a minor issue though; I'm not sure how much it's worth looking into from a contributor!

did you try the ci build? If yes, then can't think of anything else (without debugging) which might be causing this.

I'm having the same issue on a fresh install. echo $0 and echo $SHELL both return bash in Hyper, while returning zsh in terminal. switching the default shell back and forth works but only terminal reflects the change. I manually put zsh in as my shell in my hyper config and it's working fine (although it's printing a % on the first line for some reason). I suspect hyper isn't honouring the system shell.

update: I tried the canary build and the behaviour is exactly the same

I also have this problem on a fresh install, switching between bash and zsh works perfectly fine in the terminal app, no change in behavior in hyper though. (I also get the "%" in the first line of hyper when changing to /bin/zsh manually. Interestingly, echo $0 does not indicate that zsh or bash run as login shells although shellArgs is set accordingly.)

Just to update anyone else who reads this, I had the same issue described above where $SHELL was correctly set to /bin/zsh on Terminal.app, but was still using /bin/bash on Hyper. For me it was fixed after fully logging out and back in again, simply opening a new terminal session did not work. I guess it could just be a bug with chsh.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sarneeh picture sarneeh  路  3Comments

ghost picture ghost  路  3Comments

cooperpellaton picture cooperpellaton  路  3Comments

juicygoose picture juicygoose  路  3Comments

cilice picture cilice  路  3Comments