I keep getting bit by this old bug:
bash - /sw/bin/init.sh fails to set undefined variables - ID: 1511981
As reported there, a number of variables in /sw/bin/init.sh are checked via
if [ -n "$VAR" ] ; then . . .
which fails when the user has "set -u", "set -o nounset", or "shopt -o
costabel wrote "I am closing this now; it doesn't look like anyone wants
to change anything there." when he closed it marked "Wont fix"
Please reconsider. Patch attached.
$ env -i bash --login --noprofile -norc
bash-3.2$ export HOME=~
bash-3.2$ set -u && . /sw/bin/init.sh
bash: MANPATH: unbound variable
bash: INFOPATH: unbound variable
bash: PERL5LIB: unbound variable
bash: DYLD_FALLBACK_LIBRARY_PATH: unbound variable
bash: list[@]: unbound variable