observing/pre-commit

Windows binary operator error

Closed this issue · 2 comments

I'm getting the following error on Windows when I try to use this package:

.git/hooks/pre-commit: line 11: [: /c/Program: binary operator expected pre-commit:

This is line 11 from the referenced file:

if [ -z $HAS_NODE ] && [ -f ~/.bash_profile ]; then

Can you provide any help?

Package version 1.0.10
Node version: 0.10.31
NPM version 2.13.2
Windows 7

Having this issue as well. I'm thinking that in this line "if [ -z $HAS_NODE ] && [ -f ~/.bash_profile ]; then" it seems to be evaluating to C:/Program Files but since Program Files has a space then it throws the issue.

could you try adding ""so it becomes -z "$HAS_NODE"

edit: i'll test this myself :) and release a fix