Closed jigarius closed 1 year ago
My configuration
# grumphp.yml grumphp: tasks: shell: scripts: - scripts/foobar.php triggered_by: [php]
Steps to reproduce:
mkdir tmp cd tmp git init echo "vendor" > .gitignore pbpaste > grumphp.yml composer require --dev phpro/grumphp # Your actions # Please add the steps on how to reproduce the issue here. # Run GrumPHP: ./vendor/bin/grumphp run
Create a file scripts/foobar.php:
scripts/foobar.php
#!/usr/bin/env php <?php echo 'Yay!' . PHP_EOL; exit(0);
Result:
scripts/foobar.php: 1: cannot open ?php: No such file To skip commit checks, add -n or --no-verify flag to commit command
The script is not executed as PHP. It seems to be executed in some other way.
I have finally managed to solve this issue by using this config:
grumphp: tasks: shell: scripts: - ["-c", "scripts/grumphp/drupal--config-langcode.php"] triggered_by: [yml]
My configuration
Steps to reproduce:
Create a file
scripts/foobar.php
:Result:
The script is not executed as PHP. It seems to be executed in some other way.