Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added pre-composer command to replace composer if there is a vendor v…
…ersion
- Loading branch information
942b89a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for exploring this territory!
You'll probably be more satisfied with
ln -sf /var/www/html/vendor/bin/composer /usr/local/bin/composer
than remove-and-link.I see
readlink
returns empty string when it's not a link, so the strategy should be OK.I assume that you never use an alternate composer_root, which would change this logic.
942b89a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rfay!
As for removing the link, you're absolutely right! I hadn't thought of it that way. I think I'll replace those two lines with what you recommend.
I've been testing the option of using composer_version but for CI I was having problems keeping it in sync with the composer.json version.
This is a workaround while we see if the issue we raised this morning goes through. I think it's quite hacky, but at least it works and in the controlled environments of aljibe I think it can work well. What I'm going to have to investigate is if the vendors can be installed somewhere else... or some way to make this ‘configurable’. But to solve the inconsistency problems that the different versions of composer are generating in CI is enough.