Prevent MacPorts editing .bash_profile over and over again...

Clemens Lang cal at macports.org
Sun Jan 29 17:29:28 UTC 2017


Hi,

On Sun, Jan 29, 2017 at 02:13:12PM +0000, Barry wrote:
> I have been using the .pkg to reinstall MacPorts. I guess that does
> not check.

It does. Specifically, the check checks what your user's shell is using

  /usr/bin/dscl . -read "/Users/${USER}" shell | awk -F'/' '{print $NF}'

Supported shells are bash and tcsh. For bash, the installer then runs

  bash -l -c "/usr/bin/printenv PATH" | grep "/opt/local"

to determine whether your configuration needs adjusting. For some reason
this fails in the installer, although we haven't been able to figure out
why.

If you'd like to help debug this, that would be very welcome. I've tried
adding more checks for the 2.4.0 release (like doing nothing if the
config file to be changed contains 'MacPorts Installer addition'), but
apparently none of them worked properly in your case.


-- 
Clemens


More information about the macports-users mailing list