The commands drush en <modulename> and drush dis <modulename> shouldn't ask for confirmation if no dependencies are hit.
So e.g. drush en <modulename> should proceed without confirmation if only <modulename> will get installed by it.

CommentFileSizeAuthor
#7 drush-2037053-6.patch1.76 KBchi
#3 drush-2037053-3.patch1.15 KBchi

Comments

jonhattan’s picture

Version: 7.x-5.8 » 8.x-6.x-dev

Agree. This prompt becomes heavy, and it's a task with no much risk of failure.

Patches welcome

moshe weitzman’s picture

I think this is a good idea as well.

chi’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

Seems like an easy fix.

jonhattan’s picture

Status: Needs review » Needs work

It can be smarter.

* If devel is already enabled, drush en devel views shouldn't prompt.
* drush en devel devel shouldn't prompt.
* drush en devel,views is only one argument to the function, not two.

At some point in drush_pm_enable_validate() we have the count of extensions the user asked, once we have excluded the ones already enabled and others. Then this number may be passed to drush_pm_enable() via context.

chi’s picture

If devel is already enabled, drush en devel views shouldn't prompt.

If devel is not enabled, drush en devel views shouldn't prompt as well. Because devel doesn't depend on views module. Right?

jonhattan’s picture

right

chi’s picture

Status: Needs work » Needs review
StatusFileSize
new1.76 KB

Let's do it without counting.

moshe weitzman’s picture

Assigned: Unassigned » jonhattan

assigning to jonhattan for review.

greg.1.anderson’s picture

Status: Needs review » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.

moshe weitzman’s picture

Status: Closed (won't fix) » Closed (duplicate)