Skip to content

[Regression] Double ports in drush_uri / Error: Invalid URI: Host is malformed. #188

@silverham

Description

@silverham

Problem

If I have a .lando.yml file with non-standard http port for the container web server then I get an DRUSH_OPTIONS_URI URL where the container port is included in addition to lando's proxy port (if non-standard).

Previously, it was default and i could copy/paste lando URL into web browser, now i get error using url because malformed Drush URI.

Seems related to:

Problem Code - Example 1:

So using:

Lando proxy: ~/.lando/config.yml

proxyHttpPort: 8080
proxyHttpsPort: 8443

.lando.yml

proxy:
  appserver:
   - my-project-appserver.lndo.site:8080

Shows:

www-data@f640aa204d57:/app$ printenv | grep DRUSH
DRUSH_OPTIONS_URI=https://my-project-appserver.lndo.site:8080:8443

Problem Code - Example 2:

Also, if using extended proxy syntax of:
.lando.yml

proxy:
  appserver:
   - hostname: my-project-appserver.lndo.site
     port: 8080

Shows:

www-data@f640aa204d57:/app$ printenv | grep DRUSH
DRUSH_OPTIONS_URI=https://[object Object]:444

Problem Drush error

Additionally, any drush related commands show error:

$ lando drush uli

In Request.php line 367:
  Invalid URI: Host is malformed.  

Solution

Reuse same logic for lando proxy to get hostname explicity.

@see #189

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions