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

Run terminate before the shell runs to avoid database errors when the core-cli command finishes #1785

Merged
merged 3 commits into from Nov 19, 2015

Conversation

damiankloip
Copy link
Contributor

See comment for explanation. This is not ideal but it does work, not sure there is a better way at the moment to be honest. This will actually run terminate() twice, but because we already have the subscriber instances created before the shell is run, when the shell exits they still work.

@dawehner
Copy link
Contributor

Nice!

.... SUCCESS!
~/w/d8 (2616816) $ drush php
Psy Shell v0.5.2 (PHP 5.5.28 — cli) by Justin Hileman
>>> exit
Exit:  Goodbye.
~/w/d8 (2616816) $

@dawehner
Copy link
Contributor

RTBC

@damiankloip
Copy link
Contributor Author

This fixes it for Drupal 8 only. I can still see this in D7 when stuff uses the database in a shutdown function.

@damiankloip
Copy link
Contributor Author

OK, going to merge this now. For me it fixes the errors when exiting the shell and doesn't cause any side effects for D7 or D8 usage. If this does have issues later on, we will only really know from more widespread testing :)

damiankloip added a commit that referenced this pull request Nov 19, 2015
Run terminate before the shell runs to avoid database errors when the core-cli command finishes
@damiankloip damiankloip merged commit 26823ec into drush-ops:master Nov 19, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants