Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Try using bash for login startup #12058
Profiles on some Linux systems contain bashisms that are not /bin/sh compatible, causing issues.
By trying bash first, we eliminate this problem.
No worries. I'm responsible for this feature and have been wanting to fix it in WSL (especially because setting pwsh as your login shell there causes an error that's very hard to fix).
With your analysis, it makes sense why it wasn't working now, and I'm happy to enable the fix.
I think this can have negative consequences. What if user have some shells installed (this is a common case) on a system but configure tcsh as default and configure paths only for tcsh? In the case we call bash and get wrong paths.
That's not a POSIX-compliant shell. We should be able to execute POSIX shell script from any POSIX-compliant shell; that's the definition of POSIX-compliant. The scripts and paths should be written for any /bin/sh to execute them, and our choice of implementation doesn't matter.
The issue is that dash is the default /bin/sh on some platforms and doesn't like the way paths are passed, while bash and zsh have no problem with it.
I agree that I don't like looking for another file at startup, but (1) it's only on Linux when
What do we catch though? We're p/Invoking into a syscall, so there's no exception. Theoretically it returns an error code, except it's
The only solution to that is making the