Non-interactive bash errors from flake.nix mkShell

I have a flake I use to enter a development shell environment (via direnv) for building a nodejs vscode extension, and I also run code from that dev shell.

I ran into an issue where the terminal being executed by vscode was behaving strange, specifically throwing the error:

bash: shopt: progcomp: invalid shell option name

And the resulting shell was not very usable at all.

After some digging I found a couple of posts:

The discourse post above has the solution I used, but didn’t include a reference to the actual bash error I was seeing at least, so wanted to post something again here to help people running into this.

Adding buildInputs = [ pkgs.bashInteractive ]; into the mkShell part of my flake.nix solved the issue.

I’m curious if there a better way to fix this so it doesn’t have to be added to each flake?

1 Like

Same problem here, fixed by follow your solution.