consolidation / cgr

Safe replacement for `composer global require`
451 stars 24 forks source link

Provide the ability to display information of the projects installed via 'cgr' #12

Closed uberhacker closed 7 years ago

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-2.3%) to 91.827% when pulling c4f202ce694300970f08aa1e344eb4d076eaec21 on uberhacker:master into 5fb0d1e7c9c389b7f1c0284410a4bb7d3c63a98d on consolidation:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 94.231% when pulling 70af75eb9d792c037685d547843b4da420a8ae94 on uberhacker:master into 5fb0d1e7c9c389b7f1c0284410a4bb7d3c63a98d on consolidation:master.

greg-1-anderson commented 7 years ago

This fails on projects that have been removed via cgr remove org/proj. In this case, Composer leaves behind a composer.json with an empty require section.

uberhacker commented 7 years ago

What is your suggested fix?

greg-1-anderson commented 7 years ago

Thinking about it. Perhaps cgr could be more destructive during a remove; however, I think it would be good to detect and skip empty projects.

greg-1-anderson commented 7 years ago

It would probably be sufficient to just let composer error out on removed projects as it currently does, as long as cgr info kept going after one failure. With the current implementation, you don't see the rest of your installed projects once you hit one that has been removed.

greg-1-anderson commented 7 years ago

Example of acceptable output -- last installed project is removed. Removing the first project causes problems, though.

screen shot 2016-12-27 at 11 32 17 am

greg-1-anderson commented 7 years ago

Thanks for this. Making info not fail fast would be a worthwhile follow-on exercise if you feel like it. Or wait for something like https://github.com/composer/composer/pull/6001