phpro / grumphp

A PHP code-quality tool
MIT License
4.14k stars 430 forks source link

Git hooks fail if there's a whitespace in the path #849

Closed matthijs-va closed 3 years ago

matthijs-va commented 3 years ago
Q A
Version 1.1.0
Bug? yes
New feature? no
Question? no
Documentation? no
Related tickets

Both git hooks fail if there's a whitespace in the path. Running GrumPHP directly doesn't give any issues.

.git/hooks/pre-commit: 13: export: packages/Robo: bad variable name

The problem seems to be fixed when wrapping the git rev-parse command in quotes:

export GRUMPHP_GIT_WORKING_DIR="$(git rev-parse --show-toplevel)"
veewee commented 3 years ago

Thanks for reporting! Ah yes... that makes sense...

Care to create a PR for this?