Setting environment variables to use SmartGit

I have a pre-commit hook that runs some tests. This worked fine until the tests started relying on environment variables. Is there a way to set these environment variables in SmartGit so that pre-commit tests can fail?

+3


source to share


2 answers


SmartGit will pass all of its own environment variables to the forked process git

. Hence, if you make sure SmartGit is running with the correct configuration, your pre-commit hook should work.



+1


source


Two options:

1) Add variables to /etc/profile

or /etc/launchd.conf

and SmartGit will pick them up.



2) Just run SmartGit from the shell instead of the desktop environment and your variables from files like ~/.bashrc

will be present. (This is what I am doing, using a concise alias for convenience.)

+1


source







All Articles