Skip to content

Conversation

@mvidmar
Copy link

@mvidmar mvidmar commented Apr 24, 2015

Hi,

I fixed the enviroment issues with Mac not loading enviroment variables. Not the prettiest fix but I can confirm it working on my Mac.

@johnhidey
Copy link
Owner

@mvidmar Thanks for pull-request. Great work, I have been struggling with Mac support being that I'm not a Mac user. I'll have a look at it this evening and see if I can have a new version out this weekend.

@johnhidey
Copy link
Owner

Wasn't able to look at this over the weekend, I'll have to see how my upcoming week looks. 🎱

@shaneparsons
Copy link

This doesn't work on my mac and seems to break it even further.

Here's the error I get for everything /bin/bash: /c: No such file or directory.
Might be wrong but I don't think the /c should be there..

@johnhidey
Copy link
Owner

Hoping to get some time this upcoming weekend to work on this. @shaneparsons The /c most for mac I believe should be a -c instead. I'll try to make that adjustment and push this upcoming weekend assuming I can find the time.

@joshuaess
Copy link

OS X no longer uses $HOME/.MacOSX/environment to store environmental variables. ~/.launchd.conf is the modern equivalent, but it must be created manually. http://stackoverflow.com/questions/603785/environment-variables-in-mac-os-x/4567308#4567308

@carlosrubio
Copy link

I used this in Yosemite with a little trick. @joshuaess is right about the fact that $HOME/.MacOSX/environment.plist is no longer used by MacOSX so this might not be the final fix.

What I did to make it work is to crete by hand the $HOME/.MacOSX/environment.plist following this instructions:
http://www.dowdandassociates.com/blog/content/howto-set-an-environment-variable-in-mac-os-x-home-slash-dot-macosx-slash-environment-dot-plist/

Bad part is that you need to create the file by hand and maintain the contents. What I did was to create a file like :
{
PATH = "/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Users/someuser/Development/apache-maven-3.2.3/bin";
}

As this is not a OS file any more probably it would be better to use a different name&path or even better setup this value directly as an addon variable... If I have time in the following day I might propose a pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants