Closed BrianHenryIE closed 4 years ago
Hi! Thank you for taking the time to report this issue and suggest a fix.
I will look into this today and (hopefully) merge and deploy a fix for this tomorrow.
For now, I'd like to make a reproduction scenario and an automated test to validate the correct behaviour.
Any updates will be posted here.
Create a new directory with composer.json
:
{
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "0.5"
},
"scripts": {
"post-install-cmd": [
"echo \"Success\""
],
"post-update-cmd": [
"echo \"Success\""
]
}
}
Execute composer install
and observe "Success".
Change the version number to 0.6
. Run composer update
twice. All subsequent invocations of composer install
or composer update
will fail to print "Success". Return to version 0.5
. Run composer update
twice. All subsequent invocations will succeed.
Thank you for the detailed description! 👍 My test scenarios for this issue had a similar setup, but the details helped speed things up a bit.
The change fixes all the scenarios I created for this issue. Since they do not break any of the already existing test scenarios, I am merging this.
Thanks again for your help!
After the 0.6.0 update, Composer's
scripts/post-install-cmd
andscripts/post-update-cmd
were no longer running.This was due to PHP exiting outright rather than returning the
$exitCode
.