Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Syntax Error in pre-commit ? #12

Closed
shadyvb opened this issue Oct 13, 2013 · 2 comments
Closed

Syntax Error in pre-commit ? #12

shadyvb opened this issue Oct 13, 2013 · 2 comments
Labels

Comments

@shadyvb
Copy link
Contributor

shadyvb commented Oct 13, 2013

Checking staged changes...
.git/hooks/pre-commit: 22: .git/hooks/pre-commit: Syntax error: "(" unexpected
@westonruter
Copy link
Contributor

@shadyvb I think the problem is in different versions of Bash. It works fine on OS X, but I've noticed it fails on our Vagrant box. Specifically, the problem seems to be with populating an array:

IFS=$'\n' staged_js_files=( $(git status --porcelain | egrep $git_status_egrep'\.js$' | cut -c4-) )

@westonruter
Copy link
Contributor

Fixed in 86d46a9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants