waveterm icon indicating copy to clipboard operation
waveterm copied to clipboard

Nix Shell isn't respected on MacOS

Open kamushadenes opened this issue 1 year ago • 0 comments

Describe the bug When starting a new tab, Wave seems to always use /bin/bash, disregarding PATH variable that makes it use /etc/profiles/per-user/USER/bin/bash and also the user's default shell.

This makes it fail to load .bashrc due to MacOS's ancient bash version, with errors like

/connect local

bash: shopt: globstar: invalid shell option name
bash: shopt: checkjobs: invalid shell option name
bash: /Users/kamushadenes/.bashrc: line 23: conditional binary operator expected
bash: /Users/kamushadenes/.bashrc: line 23: syntax error near `BASH_COMPLETION_VERSINFO'
bash: /Users/kamushadenes/.bashrc: line 23: `if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then'
wave> initialized connection state (shell:bash)

Curiously, after starting up, it switches to the correct version, but bash: shopt: globstar: invalid shell option name is clear indication that it's using the system's /bin/bash 3.2 version to start (globstar was added in 4.0).

Running bash ~/.bashrc after start gives no errors, showing that after start it is actually using the correct bash.

Ignoring fish for now (which IS my main shell, I'm just trying to use this thing), https://github.com/wavetermdev/waveterm/issues/91 is essential.

To Reproduce Steps to reproduce the behavior:

  1. Use nix-darwin and home-manager
  2. Open Wave

Expected behavior It loads my default shell.

Screenshots CleanShot 2024-07-25 at 04 40 08

Desktop (please complete the following information):

  • OS: MacOS, arm64
  • Version 0.7.6

kamushadenes avatar Jul 25 '24 07:07 kamushadenes