-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report when puli is found but not executable #177
Comments
This issue is again consuming my time. We discussed somewhere that if the puli build fails it does not necessarily mean that the build should fail as well. However, in case of Symfony, it fails during building the container, so in fact puli is a requirement to succeed. But right now there is now way to debug the puli process in the CI in any way, since there is no feedback at all about failures (correct me if I am wrong). |
@sagikazarmark Thanks for reporting this issue. Can you give any hints on how we could improve this situation? |
I've looked into the code and I found this: https://github.com/puli/composer-plugin/blob/master/src/PuliRunner.php#L72 Reading out loudly: if the script declares the executor or starts with PHP open tag than prepend the PHP executable, otherwise just prepare the command. When the script is identified as PHP script it is passed as a parameter to PHP where we don't require executable permission. In the other case, the script needs to be executable. I propose adding an extra check there whether the script is executable or not and raise a warning when not. |
@sagikazarmark ok, can you provide a PR? You should however keep in mind that .bat-files on Windows do not need to be executable AFAIK (see the code in |
PS: I hate this part of the code |
I will try to provide a platform-independent PR, although I think that it should be the responsibility of the process library. Another solution could be to examine the result of running the command: if it is permission denied then handle the case instead of pre-checking it. |
I spent half an hour with investigating why builds are failing when the executable was definitely there.
If it is not executable, the composer plugin silently fails.
Also, I don't understand why checking executable bit is necessary in the first place, because as I can see, it is executed with the php interpreter anyway.
The text was updated successfully, but these errors were encountered: