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

Add exception for missing composer.json file/document need for composer.json file #36

Open
jamiehollern opened this issue Aug 15, 2018 · 5 comments

Comments

@jamiehollern
Copy link

A project I worked on removed the composer.json as a security precaution, which in turn broke Drush. It turns out that this is because it uses drupal-finder to ascertain the Drupal root, which uses composer.json to figure that out. It would be handy to throw a specific exception for this instance, and to document it somewhere.

@weitzman
Copy link
Collaborator

also throw for unparseable json.

@hepabolu
Copy link

+1 I happened to have a comma where there shouldn't be one. It took me several hours before I noticed after having reinstalled drush, drush-laucher and drupal-vm.

@orlandothoeny
Copy link

orlandothoeny commented Jul 26, 2019

+1
Would also be nice to add an option to disable the check for the composer.json file.
In case it is not present, because it is not required for running Drupal. Why is this check needed? Wouldn't it be a possibility to just check the VERSION constant inside core/lib/Drupal.php instead?

@johnzzon
Copy link

+1 for this. I deployed a build artifact and obviously saw no need to include the composer.json. This makes drush not work since DrupalFinder requires a composer.json.

@JPustkuchen
Copy link

Yup this definitely makes sense and adds important debug information.

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

6 participants