Skip to content

grunt githooks and SourceTree

Gary Jones edited this page Aug 18, 2014 · 1 revision

If using SourceTree to manage your git repo, then you'll find that references to node and grunt within a grunt-githooks template will fail with command not found.

Specifically, it probably won't work when SourceTree is started from anywhere except the command line, since the environment variables for where node and grunt are, are not picked up by SourceTree.

One solution is to symlink the default locations of node and grunt, to the directory where SourceTree looks for them:

sudo ln -s /usr/local/bin/node /usr/bin/node
sudo ln -s /usr/local/bin/grunt /usr/bin/grunt
Clone this wiki locally