Closed Synchro closed 2 years ago
Hello @Synchro,
That is strange indeed. I assume you are talking about committing through the user interface inside Phpstorm? Can you share me some details about your operating system?
The error you get is comping from the amp/parallel
package:
https://github.com/amphp/parallel/blob/master/lib/Context/Process.php#L202
This package is being used for running the tasks in parallel. If you disable parallel execution, you won't get the error anymore:
grumphp:
parallel:
enabled: false
Now this isn't really a solution for your problem. As you can see in the linked amp codebase, the excpetion encapsulates the real exception. You might get more information about WHY the process failed to start if you configure AMP_DEBUG=true in your env.
grumphp:
environment:
variables:
AMP_DEBUG: "true"
I have a suspicion that Phpstorm might be using some other or internal binaries instead of the once you are using in your terminal.
Can you add some more feedback based on the information above, so that we can find out the source of the issue? Thanks for reporting!
Thanks for the advice. I've enabled debug output so I'll see how it goes and let you know if I see anything interesting. I'm running latest EAP builds of PHPStorm 2021.3, and PHP 8.0.12 installed from homebrew on macOS 11.6.
Were you able to inspect the issue a bit more @Synchro ?
Thanks for following up. I don't know why – though I have upgraded all of macOS, PHP, and PHPStorm since creating this issue – but the problem seems to have gone away by itself, and nothing interesting was logged. One of the mysteries of the universe I guess!
Thanks for clearing this out! Glad it works for you now. :)
1.5.0
I have grumphp configured on a git commit hook, running under PHP 8.0.12. Sometimes it fails with an unhelpful error message:
My configuration
This appears to be a problem with the way that grumphp is run by PHPStorm. If I run
./vendor/bin/grumphp run
or./vendor/bin/grumphp git:pre-commit
from a shell, the commands run successfully (and no problems are found).Similarly, if I run a simple
git commit -a -m "message"
, grumphp runs successfully.Because there is no information about why "Starting the process failed", I'm at a loss as to where the problem lies. grumphp is clearly being triggered successfully, but seems to fail for some internal reason.
I also note that this seems to be intermittent, and I can't see a pattern. The particular case that's triggering it for me now is a simple copy change inside a quoted string, changing an
O
toØ
, so perhaps there are charset environment issues?