Pass default domain to remote drush command #1694
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
As a manager of a dozen applications at Acquia, I want to use
acli remote:drush
to perform routine tasks (especiallyuli
login) on multiple remote applications without remembering to type the correct--uri
every time. Previously with Drupal 7/drush 8/Acquia Cloud API v1 one could usedrush acquia-update
to easily keep local aliases up-to-date, but this is no longer an option.Proposed changes
Since
remote:drush
is already fetching the Acquia environment information behind the scenes for the alias provided, it should pass along thedefault_domain
parameter when none is given by the user. Allow the user to continue to provide their own--uri
parameter if the default isn't sufficient (on a drush command, the last duplicate parameter wins).Alternatives considered
Manually typing the correct
--uri
flag when needed for a drush command likeuli
is redundant and painful.Testing steps/example usage
acli remote:drush site.dev -- status --fields=uri
acli remote:drush site.dev -- uli
acli remote:drush site.dev -- uli --uri=https://example.com