Closed wenga86 closed 7 years ago
Cool, thanks for the information. It sounds like you have everything working properly, then?
Would it be helpful to create another hook template that automatically configures SourceTree properly? https://github.com/jish/pre-commit/tree/master/templates/hooks
$ pre-commit install --source-tree
I have released a new version of the gem that supports the --sourcetree
option.
pre-commit install --sourcetree
RVM
Since terminals and full .apps have completely different environments (and PATH variables) the default path used by SourceTree did not expose rvm to SourceTree. In order to ensure SourceTree knows about rvm we added the following a conditional to the hook to add the rvm path if it wasn't included already. This exposed rvm so the hook could successfully execute rvm.
LC_CTYPE
We are running on Mac OSX 10.11.6. SourceTree's default encoding is C rather than UTF-8 which caused an encoding issue in ExecJS.
Enforcing a LC_CTYPE of UTF-8 resolved the issue.
Ruby Version 2.1.2