Skip to content

Commit

Permalink
Avoid to pass an undefined args argument to spawn (#34)
Browse files Browse the repository at this point in the history
* Avoid to pass an undefined args argument to spawn as it makes the option object being ignored
fix #33

* comply to code style
  • Loading branch information
maxlath authored and tarmolov committed Nov 11, 2016
1 parent 069d80a commit 5306e05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/git-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ function spawnHook(hookName, args) {
if (!isHookExecutable) {
throw new Error('Cannot execute hook: ' + hookName + '. Please check file permissions.');
}
args = args || [];
return spawn(hookName, args, {stdio: 'inherit'});
}

Expand Down

0 comments on commit 5306e05

Please sign in to comment.