Skip to content

Commit 4e127e4

Browse files
reidisaacs
authored andcommitted
Pass the env correctly for a .hooks script.
The environment was being passed as the arguments, which doesn't work very well since it's an object. Instead, pass empty arguments.
1 parent eaedd62 commit 4e127e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils/lifecycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function lifecycle (pkg, stage, cb) {
4646
var hook = path.join(npm.dir, ".hooks", stage)
4747
fs.stat(hook, function (er) {
4848
if (er) return cb()
49-
exec(hook, env, function (er) {
49+
exec(hook, [], env, function (er) {
5050
if (er) log("Failed to exec "+stage+" hook script", pkg._id)
5151
if (npm.ROLLBACK) return cb()
5252
cb(er)

0 commit comments

Comments
 (0)