You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently discovered that my nightly backup had been silently failing for nearly a week. The backup runs from cron calling a custom drush command like this: cronwrap drush -y @allbackup my-backup-command
I had mistakenly mistyped an alias in the group @allbackup. Drush printed a warning message and exited without running the command on any server yet with code 0. cronwrap deduced the command had succeeded so I didn't get any alert.
To reproduce the bug, set up aliases.drushrc.php as follows: $aliases['myalias'] = ['site-list' => ['@badalias']];
Then run the sequence of shell commands below
$ drush @myalias status
You are about to execute 'status' non-interactively (--yes forced) on all of the following targets:
@badalias
Continue? (y/n): y
Not found: @badalias [warning]
$ echo $?
0
In contrast, drush correctly reports an error when running directly with a bad alias.
$ drush @badalias status
Could not find the alias @badalias [error]
$ echo $?
1
The text was updated successfully, but these errors were encountered:
I recently discovered that my nightly backup had been silently failing for nearly a week. The backup runs from cron calling a custom drush command like this:
cronwrap drush -y @allbackup my-backup-command
I had mistakenly mistyped an alias in the group @allbackup. Drush printed a warning message and exited without running the command on any server yet with code 0. cronwrap deduced the command had succeeded so I didn't get any alert.
To reproduce the bug, set up aliases.drushrc.php as follows:
$aliases['myalias'] = ['site-list' => ['@badalias']];
Then run the sequence of shell commands below
In contrast, drush correctly reports an error when running directly with a bad alias.
The text was updated successfully, but these errors were encountered: