Last active
August 29, 2015 14:19
-
-
Save greg-1-anderson/56d640c4c6c067b479d0 to your computer and use it in GitHub Desktop.
Convert 'drush cc all' into 'drush cache-rebuild' on Drupal 8 sites.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Put this in ~/.drush/policy.drush.inc | |
function policy_drush_command_alter(&$command) { | |
if (($command['command'] == 'cache-clear') && (drush_drupal_major_version() >= 8)) { | |
$command['command'] = 'cache-rebuild'; | |
$command['command-hook'] = 'cache-rebuild'; | |
$command['primary function'] = FALSE; | |
$command['arguments'] = array(); | |
drush_set_command($command); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment