Closed (fixed)
Project:
Drush
Version:
7.x-5.1
Component:
Core Commands
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 May 2012 at 16:17 UTC
Updated:
24 May 2012 at 21:30 UTC
My policy.drush.inc file in my user's .drush folder:
function drush_policy_sql_sync_validate($source = NULL, $destination = NULL) {
return drush_set_error(dt('Not allowed'));
}
Output when not explicitly including .drush (see attached for full debug output):
vagrant@ubuntu-10:/srv/www$ drush sql-sync @prod @local --no-cache
You will destroy data from drupal and replace with data from test.org/testorg_prod.
You might want to make a backup first, using the sql-dump command.
Do you really want to continue? (y/n): n
Aborting. [cancel]
Output when explicitly including .drush (see attached for full debug output):
vagrant@ubuntu-10:/srv/www$ drush --include=~/.drush sql-sync @prod @local --no-cache
Not allowed [error]
| Comment | File | Size | Author |
|---|---|---|---|
| policy_included_debug.txt | 2.92 KB | dkingofpa | |
| policy_not_included_debug.txt | 3.74 KB | dkingofpa |
Comments
Comment #1
moshe weitzman commentedWhere did you put the policy file? At @local or at @prod? I think it needs to be @prod. Not sure where though. try running
drush @prod statusand review the list of config files that are mentioned at the bottom.Comment #2
greg.1.anderson commentedIf you have
$options['include'][] = "/some/path/that/does/not/exist";, then it prevented Drush from searching for any further paths in the list, including $HOME/.drush. Putting --include= on the cli increases the priority of this location, working around this bug.Fix committed. 262047a.
Comment #3
dkingofpa commentedUgh...I believe my ultimate problem with this was that after I added my policy.drush.inc, I never cleared drush's cache. Dang it. But at least it seems like a bug was squashed in the mean time.