You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Generate empty folder
mkdir tmp
cd tmp
git init
echo"vendor"> .gitignore
pbpaste > grumphp.yml
composer init --no-interaction && composer require --dev phpro/grumphp
# Your actions# Please add the steps on how to reproduce the issue here.
vendor/bin/grumphp git:init -vvv && cat .git/hooks/pre-commit
# Run GrumPHP:
git add -A && git commit -m"Test"# or
./vendor/bin/grumphp run
Result:
Run a one-off command on a service.
For example:
$ docker-compose run web python manage.py shell
By default, linked services will be started, unless they are already
running. If you do not want to start linked services, use
`docker-compose run --no-deps SERVICE COMMAND [ARGS...]`.
Usage:
run [options] [-v VOLUME...] [-p PORT...] [-e KEY=VAL...] [-l KEY=VALUE...]
SERVICE [COMMAND] [ARGS...]
Options:
-d, --detach Detached mode: Run container in the background, print
new container name.
--name NAME Assign a name to the container
--entrypoint CMD Override the entrypoint of the image.
-e KEY=VAL Set an environment variable (can be used multiple times)
-l, --label KEY=VAL Add or override a label (can be used multiple times)
-u, --user="" Run as specified username or uid
--no-deps Don't start linked services.
--rm Remove container after run. Ignored in detached mode.
-p, --publish=[] Publish a container's port(s) to the host
--service-ports Run command with the service's ports enabled and mapped
to the host.
--use-aliases Use the service's network aliases in the network(s) the
container connects to.
-v, --volume=[] Bind mount a volume (default [])
-T Disable pseudo-tty allocation. By default `docker-compose run`
allocates a TTY.
-w, --workdir="" Working directory inside the container
Escaping of the EXEC_GRUMPHP_COMMAND is not correct: (cd "./" && printf "%s\n" "${DIFF}" | 'docker-compose' 'run' '--rm' '--no-deps' '-u' '$(id' '-u):$(id' '-g)' 'php' 'vendor/phpro/grumphp/bin/grumphp' 'git:pre-commit' '--skip-success-output')
Maybe we should allow to pass an array to EXEC_GRUMPHP_COMMAND and pass it to symfony/process as-is and get back the command to run and remove ProcessUtils from here.
The text was updated successfully, but these errors were encountered:
My configuration
Steps to reproduce:
Result:
Escaping of the EXEC_GRUMPHP_COMMAND is not correct:
(cd "./" && printf "%s\n" "${DIFF}" | 'docker-compose' 'run' '--rm' '--no-deps' '-u' '$(id' '-u):$(id' '-g)' 'php' 'vendor/phpro/grumphp/bin/grumphp' 'git:pre-commit' '--skip-success-output')
The problem is the explode in this line:
grumphp/src/Process/ProcessUtils.php
Line 56 in 3be2d5f
Maybe we should allow to pass an array to EXEC_GRUMPHP_COMMAND and pass it to symfony/process as-is and get back the command to run and remove ProcessUtils from here.
The text was updated successfully, but these errors were encountered: