2

We excluded some modules from drush update (--lock=module_name). Is there a way to get a list of locked modules? A drush command or a file with the list?

2 Answers 2

3

There is no way to do this via Drush; the easiest way to find the locked files is with the find command:

find . -name ".drush-lock-update"

2

If listing the locked Drupal modules is something you do often you can create a drush shell alias.

Add the following code to your drushrc.php file. Your personal one is normally located at ~/.drush/drushrc.php There are 6 locations that drush will look for drushrc.php, see the example.drushrc.php file for more information.

$options['shell-aliases']['locked-modules'] = '! find . -name ".drush-lock-update"| sed \'s#/[^/]*$##\' | sed \'s!.*/!!\' ';

You can then run,

drush locked-modules

to see a list of locked modules. The code above in addition to finding the .drush-lock-update files strips this filename off and then strips off all but the module name from the path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.