Skip to content

Instantly share code, notes, and snippets.

@fastnsilver
Last active April 13, 2017 18:08
Show Gist options
  • Save fastnsilver/b7932c80d653b379fd68d12aeea3e61a to your computer and use it in GitHub Desktop.
Save fastnsilver/b7932c80d653b379fd68d12aeea3e61a to your computer and use it in GitHub Desktop.
How to get SpringSource ToolSuite to respect .bash_profile in Terminal view

Credits

@see http://stackoverflow.com/questions/829749/launch-mac-eclipse-with-environment-variables-set

Instructions

Follow these steps:

cd /Applications/STS.app/Contents

Edit

Info.plist

Replace

<string>STS</string>

underneath

<key>CFBundleExecutable</key>

with

<string>STS.sh<string>

Save changes to the file.

cd MacOS
touch STS.sh
chmod +x STS.sh

Edit STS.sh to be

#!/usr/bin/env bash -l
source ~/.bash_profile
logger "`dirname \"$0\"`/STS"
exec "`dirname \"$0\"`/STS" $@

then save changes to the file.

Execute

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/STS.app

Launch STS

Et voila!

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