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
Describe the bug
Due to some GitHub Actions issues today, I noticed that if Composer fails to install (✗ composer Could not setup composer is shown in the Action's step output), setup-php does not actually fail the step. Subsequently, when a future action tries to use composer, it receives an error:
Run composer update --prefer-lowest --prefer-dist --no-interaction --no-progress
/usr/local/bin/composer: line 1: syntax error near unexpected token `newline'
/usr/local/bin/composer: line 1: `<!DOCTYPE html>'
Error: Process completed with exit code 2.
Version
I have checked releases, and the bug exists in the latest patch version of v1 or v2.
v2
v1
Runners
GitHub Hosted
Self Hosted
Operating systems
Ubuntu 20.04
PHP versions
Any
To Reproduce
NOTE: This configuration is normally valid, but due to GH actions being unstable currently, that makes the issue "visible"
When ✗ composer Could not setup composer is observed when running shivammathur/setup-php@v2, I would expect that build step (Install PHP in my case) to fail at that point.
Screenshots/Logs
The failing step ✗ composer Could not setup composer can be observed, yet the step passes and continues, despite Composer not having successfully been installed.
The text was updated successfully, but these errors were encountered:
Ah, thank you, I had missed that. IMO it should be the default for any failures to fail fast, as it is odd for something to fail but not show failure. Thank you though, I'll make sure to use that always going forward.
This is done as some extensions and tools are specific to one OS and they leave graceful errors in the logs by default when they fail to set up. This makes it easier to create multi-OS workflows.
asgrim
added a commit
to scoutapp/scout-apm-php
that referenced
this issue
Dec 28, 2021
Describe the bug
Due to some GitHub Actions issues today, I noticed that if Composer fails to install (
✗ composer Could not setup composer
is shown in the Action's step output),setup-php
does not actually fail the step. Subsequently, when a future action tries to usecomposer
, it receives an error:Version
v1
orv2
.v2
v1
Runners
Operating systems
Ubuntu 20.04
PHP versions
Any
To Reproduce
NOTE: This configuration is normally valid, but due to GH actions being unstable currently, that makes the issue "visible"
Expected behavior
When
✗ composer Could not setup composer
is observed when runningshivammathur/setup-php@v2
, I would expect that build step (Install PHP
in my case) to fail at that point.Screenshots/Logs
The failing step
✗ composer Could not setup composer
can be observed, yet the step passes and continues, despiteComposer
not having successfully been installed.The text was updated successfully, but these errors were encountered: