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

Don't use -y automatically on drush commands, fixes #1118, fixes #455 #1120

Merged
merged 1 commit into from Sep 25, 2018

Conversation

rfay
Copy link
Member

@rfay rfay commented Sep 20, 2018

The Problem/Issue/Bug:

We have long defaulted to the drush -y, assuming people were using ddev exec or an exec hook, but it makes people crazy when they use drush inside the container.

How this PR Solves The Problem:

  • Set environment variable DDEV_EXEC when "exec" is being executed
  • /etc/drush/drushrc.php looks at DDEV_EXEC and only adds the -y option if in exec context.

Manual Testing Instructions:

  • Run ddev ssh and try drush sql-drop. It will ask first.
  • Reload db
  • Run ddev exec drush sql-drop and it will just drop the db with -y.

Automated Testing Overview:

Related Issue Link(s):

OP #1118 and #455

@rfay rfay self-assigned this Sep 20, 2018
@rfay rfay force-pushed the 20180920_fix_drush_auto_yes branch from 9c70b7d to 40fa641 Compare September 20, 2018 22:21
@rfay rfay added this to the v1.3.0 milestone Sep 24, 2018
Copy link
Contributor

@andrewfrench andrewfrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good, and the test case (drush commands provided from inside the container vs. via ddev exec) behaved as expected.

@rfay rfay force-pushed the 20180920_fix_drush_auto_yes branch from 40fa641 to 05fa6a4 Compare September 25, 2018 02:06
@rfay rfay merged commit 86cdb86 into ddev:master Sep 25, 2018
@rfay rfay deleted the 20180920_fix_drush_auto_yes branch September 25, 2018 03:41
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