Open kevtan opened 4 years ago
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.1node
version 12.6.0Hmm 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—it'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
.
In the words of my school IT director, "did you doa restart?"
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 withchsh
.
Thanks for the tip! This has been slightly annoying me since I bought my Mac, but your suggestion worked right away. Cheers.
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:
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 theshell
field in.hyper.js
to be"/bin/zsh"
but it would be nice if this worked out of the box!