Commit 98d7a622 authored by anarcat's avatar anarcat Committed by anarcat

use simpler drush_confirm instead of custom prompt

parent 87411b1c
......@@ -20,24 +20,8 @@ We are making the following assumptions:
* you are executing this script as your "aegir" user
');
$go = FALSE;
while (!$go) {
$yesno = trim(strtolower(drush_prompt(dt('Do you really want to proceed with the upgrade'), 'Y/n', TRUE)));
switch ($yesno) {
case 'no':
case 'n':
return drush_set_error(dt('Upgrade aborted by user'));
break;
case 'yes':
case 'y':
case 'y/n':
$go = TRUE;
break;
default:
drush_print(dt('Please answer "yes" or "no"'));
break;
}
if (!drush_confirm("Do you really want to proceed with the upgrade?")) {
return drush_set_error('PROVISION_CANCEL_MIGRATE', 'Upgrade canceled by user');
}
$data = drush_get_merged_options();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment