Created
February 27, 2014 13:08
-
-
Save c31ck/9249698 to your computer and use it in GitHub Desktop.
Drush policy.
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 | |
/** | |
* @file | |
* Drush policy. | |
*/ | |
/** | |
* Implements drush_hook_COMMAND_validate(). | |
*/ | |
function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) { | |
if (strpos( $destination, 'prod') !== FALSE) { | |
return drush_set_error(dt('Blocked by drush policy: dont overwrite the production DB.')); | |
} | |
} | |
/** | |
* Implements drush_hook_COMMAND_validate(). | |
*/ | |
function drush_policy_rsync_validate($source = NULL, $destination = NULL) { | |
if (strpos($destination, 'prod') !== FALSE) { | |
return drush_set_error(dt('Blocked by drush policy: dont overwrite the production files.')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment