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
That cancel choice has been there so long I don't recall its justification. I think you are the first person to actually call it out. I bet others have silently grumbled. Lets discuss in a different PR.
Solution
Stop adding the extra option in DrushStyle::choice.
We cannot completely remove the method since the Cancel option isn't the only change that override does: it also displays the choices as an indexed list instead of a keyed list:
This might be a BC break: if you pass an indexed array as options and you hardcoded the default value to a certain index, you will now have to subtract 1 from that index.
The text was updated successfully, but these errors were encountered:
Since the Cancel option is removed from choice lists (drush-ops#4907), the numerical indexes changed. Commands that use an indexed array for options and that have a default value will have to update that default value. I haven't found another occurrence of this issue in Drush core.
Since the Cancel option is removed from choice lists (#4907), the numerical indexes changed. Commands that use an indexed array for options and that have a default value will have to update that default value. I haven't found another occurrence of this issue in Drush core.
Problem
A Cancel option is prepended to every choice list, why is this necessary if you can just Ctrl+C to exit like with every other command?
@weitzman had this to say in #4853 (comment):
Solution
Stop adding the extra option in
DrushStyle::choice
.drush/src/Style/DrushStyle.php
Lines 34 to 44 in b90445c
We cannot completely remove the method since the Cancel option isn't the only change that override does: it also displays the choices as an indexed list instead of a keyed list:
This might be a BC break: if you pass an indexed array as options and you hardcoded the default value to a certain index, you will now have to subtract 1 from that index.
The text was updated successfully, but these errors were encountered: