git-validate icon indicating copy to clipboard operation
git-validate copied to clipboard

`process.env.npm_lifecycle_event` doesn't get set when running through a hook

Open sturdynut opened this issue 10 years ago • 3 comments

I created a simple repo that uses git-validate to add pre-push hooks to your package.json. It was brought to my attention that the npm_lifecycle_event is not set when running through a hook. I wanted to bring it up here to see if you've ran into this and what your thoughts are on fixing.

Here's the link to the original issue in my repo: https://github.com/sturdynut/git-prepush-hook/issues/1

I'd be happy to help fix, but just not sure how.

sturdynut avatar Nov 10 '15 15:11 sturdynut

interesting.. i'll take a look and see what's going on

nlf avatar Nov 11 '15 19:11 nlf

Any luck? Anything I can do to help?

bebraw avatar Jan 21 '16 07:01 bebraw

@nlf - Did you ever have a chance to take a look at this? Anyway to set process.env.npm_lifecycle_event in hooks if it is undefined?

sturdynut avatar Mar 09 '17 15:03 sturdynut