-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drush 9 converts command arguments as command aliases #3054
Comments
Ooops. Drush has a feature in the preflight to convert from old-style flags, e.g. We need to either remove this conversion, or enhance it so that it only converts command aliases if they appear in the Drush command position. |
Nice debugging. I dont think we can remove this conversion. The muscle memory for 'en' is large. Right now, the only arguments affected by this would be 'en' and 'si'. So, its probably just language modules that would feel the pain. If drush-language not use that literal argument, that would be ideal. Otherwise, a Drush PR which makes us only remap command name would be appreciated. See drush/src/Preflight/Preflight.php Line 99 in a2a4ebd
|
Also maybe "fr" too: it's features-revert which is likely to be used quite a bit too. And there are probably many more. but not sure it belongs here. |
Drush is not remapping fr so there will be no problem. See the array in the
link I posted above.
|
Not every two-letter command alias is a problem; Symfony would only have trouble with We currently do not have a mechanism for commands to extend the preflight conversion. There is no way we could support that, as preflight happens very early, and command hooks do not get loaded until much later. |
This still needs to be fixed. |
…y appear as the first non-option / non-alias parameter on the argv list.
* Fixes #3054: Only replace command aliases (e.g. 'en' + 'si') when they appear as the first non-option / non-alias parameter on the argv list. * Fixes #2918: Add site-specific search paths (__DRUPAL_ROOT__/drush and __PROJECT_ROOT__/drush) where commandfiles may be found. * Fix problem with bootstrapping w/ no site.
When passing arguments named like existing command aliases, they are converted to the full name of the command.
Example:
drush en fr foo
passes[‘fr’, ‘foo’]
to the command,drush en fr en
passes[‘fr’, ‘pm-enable’]
to the command, expanding the parameter as if it was a command aliasAlso happens when using
drush_invoke_process()
:drush_invoke_process('@self', 'language:export:translation', ['fr', $file], $exportOptions)
invokesexportTranslations()
withfr
drush_invoke_process('@self', 'language:export:translation', ['en', $file], $exportOptions)
invokesexportTranslations()
withpm-enable
The text was updated successfully, but these errors were encountered: