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
Plugin breaks composer status command #16
Comments
Well, according to https://getcomposer.org/doc/articles/custom-installers.md our installer behaves correctly:
|
The error is on our side, but different: the returned path must not end with a slash! |
so it fails at the <?php
mkdir('/tmp/test');
chdir('/tmp/test/');
chdir('/tmp/test');
chdir('/tmp/test2');
chdir('/tmp/test2/'); verifies that chdir does work with paths even if they end with a slash, but it fails with this exact error if the path does indeed not exist (no matter if with ending slash or not). Given the |
It seems to fail there going into Can you run a Also can you maybe check what's in the package's dir, is there a _compare dir right after the run fails? Does it contain a clean copy of the package in question? |
The
With my proposed fix (no trailing slash) this is the situation:
Might very well be an edge case involving path repositories… For completeness, this is the full output when it breaks:
|
A "fool proof" way to fix this might be to make sure |
Yeah that definitely looks like a path repo edge case due to symlinks. I think we can fix this in Composer by trimming the return value from the installers, it should make it more resilient than documenting it :) I'll get on that. |
Fellow reviewers: we can still merge the PR, doesn't harm! |
No you should absolutely fix it here because I can't fix existing composer versions. It's unfortunately not easy to fix it everywhere in one place as I hoped.. But I did fix it where it's most likely to break: composer/composer@bc93369 Can you please try again @kdambekalns using |
@Seldaek Yes, with that change it works even when our installer returns paths with trailing slashes. ✅ |
…n FileDownloader::getLocalChanges as we append a string without slash, refs #9422
In any Flow setup run
composer status
, either v1 or v2 to see an error:Since this issue is no longer caused by Composer itself (see composer/composer#7519) I debugged and found it's caused by our plugin not returning an absolute path in
getInstallPath()
The text was updated successfully, but these errors were encountered: