Comment 3 for bug 65046

Revision history for this message
Micah Cowan (micahcowan) wrote :

The word "source" is a bash extension: the portable version is the dot (".") command.

Please test with the minimally failing example. For instance, with an empty or trivial .bashrc file, does:

if [ -f ~/.bashrc ]
then
    . ~/.bashrc
fi

fail? If not, the bug would seem to be other than the one you've described. If so, please include the exact error message you received.

Also, in what way does dash "claim to be /bin/bash"? If you're referring to the contents of the $SHELL environment variable, you can't blame dash for that: while it's commonly misinterpreted to mean the currently running shell, it actually is set by login (and some shells) to be the value of the user's login shell, as specified by /etc/passwd. That is, if your login shell is /bin/tcsh, and SHELL is currently unset, and you run bash, bash will set SHELL to /bin/tcsh (and not /bin/bash). Dash may possibly do the same: or it may be that it was already set by a parent process.