Problem/Motivation
If running drush migrate:import
with the --sync
flag, while nothing needs to be synced (removed on the destination), the drush command will still output "Rolled back 1 item - done with '@name", because 0 is considered a singular value.
This is confusing, as one may think that an item got deleted, while none was.
Steps to reproduce
Consecutively run drush migrate:import --all
and drush migrate:import --all --sync
. Drush will output "Rolled back 1 item - done with '@name'", while nothing has changed.
Proposed resolution
Either print "No item has been rolled back - done with '@name'" (approach chosen in MR), or do not print anything if nothing got removed.
Remaining tasks
Review MR
Issue fork migrate_tools-3275083
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
nanakComment #4
heddn