Sublime Forum

Problem with the environment, githook fails

#1

Hi,

Situation. I have something like this in my .git/hooks/pre-commit:

#!/bin/sh
npm run lint

It nags me if try to commit something that the linter doesn’t accept.


Problem. The environment is different in Sublime Merge compared to command line, so npm won’t be found in the path and my beautiful hook fails. Am I doing something crazy or should I be able to set up the path, so that my nag script works? I find both alternatives equally likely.


Thanks!

0 Likes

#2

I for now solved the issue by invoking smerge from the same command line my repo is located at. Maybe that helps.

0 Likes