0

Step by step:

In VSCode I've set the default terminal (Command + Shift + P -> >Terminal: Select Default Profile) to bash (/bin/bash).

Close all terminals, open a new one (Control + Shift + `) and while I can see bash at the top right of the VSCode terminal panel, the text shown inside of the terminal itself says:

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.

Which is itself contradictory.

Just in case I ran chsh -s /bin/bash and it answers Changing shell for myUserName, asks for my password, proceed and changes done.

Close the terminal, open a new one and again:

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.

Now if I try to run chsh -s /bin/bash it answers chsh: no changes made, "good" -I thought-

One would assume that it should be bash then, but if I run git --version I get

git version 2.39.2 (Apple Git-143)

This is important because I've set the path to the homebrew installed git to the ~/.bashrc and it's not working even though chsh and VSCode panel are telling me this is bash...

Now if I run /bin/bash see:

$ /bin/bash

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.

bash-3.2$ git --version git version 2.41.0

I've double-checked on the system preferences (apple symbol -> System Settings -> Users & Groups -> ^myUserName -> Advanced Settings -> Login Shell) and it's /bin/bash

I'm completely out of ideas at this moment, any clue on why this is happening and how to solve/overcome? Thanks

  • I assume that suppressing the message won't make my default terminal to effectively be /bin/bash... – JoelBonetR Aug 03 '23 at 17:50
  • It's just an informational message that Zsh is the default shell (since Catalina). It doesn't affect anything. Suppressing the message does just and only that...suppress the message. – Allan Aug 03 '23 at 17:53
  • Completely agree, but my goal is to effectively use /bin/bash despite what apple wants and by default (no /bin/bash each time I open a terminal). – JoelBonetR Aug 03 '23 at 18:12
  • Not sure I understand the problem: "I can see bash at the top right of the VSCode terminal panel, the text shown inside of the terminal itself says:" -> so you are running bash already (the text is just a reminder to switch to zsh). – nohillside Aug 03 '23 at 18:52
  • how's then the git version different from running it straight away after opening the terminal from when I type /bin/bash and then git -v? The path config for the brew installed git is set to ~/.bashrc, so in my head it's using zsh even though I configured bash everywhere. – JoelBonetR Aug 03 '23 at 18:59
  • /bin/bash is the version of Bash (3.2) that shipped with macOS. You need to change your shell to the Homebrew version. See this related answer on how to do this. Again, what you're seeing is informational, not a failure. – Allan Aug 03 '23 at 19:19
  • Thank you for pointing me to the right direction Allan – JoelBonetR Aug 03 '23 at 20:12
  • 1
    @JoelBonetR VSCode is most likely running a login shell. ~/.bashrc is not executed by login shells. Refer to the INVOCATION section of the man page. – Marc Wilson Aug 04 '23 at 03:24

0 Answers0