我有一个预提交挂钩,可以运行一些测试。这曾经很有效,直到测试开始依赖于环境变量。有没有办法在SmartGit中设置这些环境变量,以便预提交测试可以完成?
答案 0 :(得分:2)
Two options:
1) Add your variables to /etc/profile
or /etc/launchd.conf
and SmartGit will pick them up.
2) Simply launch SmartGit from the shell instead of the desktop environment and your variables from files such as ~/.bashrc
will be present. (That's what I'm doing, using a brief alias for convenience.)
答案 1 :(得分:1)
SmartGit会将自己的所有环境变量传递给分叉的git
进程。因此,如果您确保使用正确的配置启动SmartGit,那么您的预提交挂钩应该可以正常工作。