Skip to content
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

getComposerRoot() returns empty string in ^1.3 #72

Open
malabya opened this issue May 30, 2024 · 3 comments
Open

getComposerRoot() returns empty string in ^1.3 #72

malabya opened this issue May 30, 2024 · 3 comments

Comments

@malabya
Copy link

malabya commented May 30, 2024

The method getComposerRoot() returns an empty string in version 1.3.0

@Holo96
Copy link

Holo96 commented Jun 4, 2024

Can confirm this
For me also getVendorDir returns empty string.

@Holo96
Copy link

Holo96 commented Jun 4, 2024

I investigated a little bit.
This actually works in drupal and drush.

But I was using drupal finder in post-install-cmd and post-update-cmd composer scripts. Where both getComposerRoot and getVendorDir return empty string. Both worked as expected with old DrupalFinder class.

I don't know if this package is supposed to support this use case.

Anyway both can be replaced with:

  • getVendorDir: $event->getComposer()->getConfig()->get('vendor-dir');
  • getComposerRoot: realpath(dirname(\Composer\Factory::getComposerFile()));

@webflo
Copy link
Owner

webflo commented Jun 18, 2024

#73 should fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants