Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By renukakulkarni on
Below is the command which I am running -
drush custom-sync @test.dev @test.local
Here 'custom-sync' is my custom drush command and 'test' is the site alias. In 'test.aliases.drushrc.php' file, aliases for dev, stage, prod and local are defined.
Output of above command -
renuka@renuka:/$ drush custom-sync @test.dev @test.local
You are about to execute 'sql-sync @test.dev @test.local version' non-interactively (--yes forced) on all of the following targets:
@test.dev
@test.stage
@test.prod
@test.local
Continue? (y/n):
Below is the code for invoking a drush sql-sync command -
drush_invoke_process('@test, 'sql-sync', array('@test.dev', '@test.local'));
Can anybody please guide me why this command is not restricted to the source and destination which I am providing ?
Comments
drush_invoke_process() is
drush_invoke_process() is going run the function on all sites specified in @test, if there is more than one. See the code here. For
For sql-sync you probably just want drush_invoke().
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
Thanks John !
Thanks John !
Your solution worked for me.