Drush newbie question: I've copied the policy.drush.inc file from drush examples and saved into my local drush folder, then cleared drush's cache - how do I confirm Drush is using that file (other than attempting to overwrite a production database with a local one!!)


The file examples/policy.drush.inc contains a drush_policy_pm_update_validate hook. If drush pm-update, gives you the message "This codebase is assembled with Composer instead of Drush. [...]" you know that Drush uses the file.

| improve this answer | |
  • I'm not seeing that message - where should I be when I run drush pm-update? I've done 'drush status' to double-check where my drush is installed, and confirmed that policy.drush.inc is in the same directory (so it's alongside drush.php). – iain-g Feb 12 '17 at 19:10
  • OK, moved policy.drush.inc into commands directory in drush, cleared drush cache and I now see the "This codebase..." message - so it's working - thank you! – iain-g Feb 12 '17 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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