Commit Graph

2 Commits

Author SHA1 Message Date
Alisdair McDiarmid 12e090ce48 command/login: Fix browser launcher for WSL users
With the current implementation of terraform login, Windows Subsystem
for Linux fails to open a browser due to lack of support for xdg-open.
This commit reuses a fix from pkg/browser#8 which detects a WSL
environment and uses cmd.exe to open the URL instead.
2020-02-13 15:02:40 -05:00
Martin Atkins 7ccd6204c4 command: Swappable implementation of launching web browsers
For unit testing in particular we can't launch a real browser for testing,
so this indirection is primarily to allow us to substitute a mock when
testing a command that can launch a browser.

This includes a simple mock implementation that expects to interact with
a running web server directly.
2019-09-09 11:15:24 -07:00