Unable to source .bash_profile in OSX Mojave (10.14.2)

Hi all,

Recently upgraded to Mojave (10.14.2). I ported my previous .bash_profile from High Sierra. When launching terminal (or source from cli), the file apparently is not read/implemented. None of the directives are implemented. I'm unable to export any of my path settings, CLI configs, or aliases. Did something change in Terminal on Mojave?


Here are the steps I've tried

  1. Added my backup .bash_profile file to my user home (~)
  2. Launched Terminal
  3. Seeing no change in the defaults, I typed
echo $PATH

expecting the output of the following

PATH="${PATH}:${JAVA_HOME}:${ANDROID_HOME}:${ANDROID_TOOLS}:${ANDROID_PLATFORM_TOOLS}:${SDKMANAGER}:${AVDMANAGER}:${NODE_MODULES}"

I instead get

/Users/michael.stelly/.nvm/versions/node/v10.15.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

I also tried this in user home

source ~/.bash_profile

That had no apparent effect


This is a serious issue as most of my development tools rely on their paths being found through $PATH.


Any help is most appreciated.

Regards,

Michael Stelly

Posted on Jan 3, 2019 7:16 AM

Reply

Similar questions

1 reply

Jan 3, 2019 7:29 AM in response to mjstelly

Ignore this post. For some reason, the imported file was not recognized as the "correct type" of file. No idea what type that would be, but yesterday I ran the following code which created a different .bash_profile with a different icon type

echo $'export NVM_DIR="$HOME/.nvm"\n. "/usr/local/opt/nvm/nvm.sh"' >> ~/.bash_profile

I copy/pasted the content of my bash_profile into this new file and relaunched Terminal. Boom! Problem solved. I wish I knew why that original file failed to be recognized, but at least it's working now. BTW, the original file was not being read prior to the creation of the second file, so it wasn't a conflict with the new file that caused the problem, not initially anyway.


Thanks anyway.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to source .bash_profile in OSX Mojave (10.14.2)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.