-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
If you run sql-sync with an invalid alias (i.e. drush sql-sync @foo.remote @foo.local, where @foo.remote isn't a valid alias), you get an obscure error:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Drush\Commands\sql\SqlSyncCommands::databaseName() must be an instance of Drush\SiteAlias\AliasRecord, boolean given,
This looks like a bug, but in fact is just Drush's way of telling you that you are using an invalid alias.
Ideally sql-sync would validate the provided aliases and provide a more helpful error message, such as if you provide an invalid alias to drush si:
The alias @foo.remote could not be found.