Owing to this issue if one tries to do a drush sql-sync
on a system where the remote machine is BSD-Unix based, such as Mac OSX, the command fails with a stat: illegal option -- - warning. The Drush 7.x branch has completely rewritten this functionality and may not suffer from the same issues. So after much poking at ways of fixing it the simplest, by far, is to use the --no-cache
option.
The easiest option to ensure this is done is to add the command specific command to your alias definition for any sites where the remote site is a mac (or the local if you're going to sync form the local up to some other system).
'command-specific' => array (
'sql-sync' => array (
'no-cache' => TRUE,
),
),