mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
The upstream bug with opening a browser on Windows Subsystem for Linux
has been fixed, so this reverts our local patch for this. The approach
upstream adds fallback support for x-www-browser and www-browser if
xdg-open fails, and this fixes the problem on WSL.
This reverts commit 12e090ce48
.
19 lines
425 B
Go
19 lines
425 B
Go
package webbrowser
|
|
|
|
import (
|
|
"github.com/pkg/browser"
|
|
)
|
|
|
|
// NewNativeLauncher creates and returns a Launcher that will attempt to interact
|
|
// with the browser-launching mechanisms of the operating system where the
|
|
// program is currently running.
|
|
func NewNativeLauncher() Launcher {
|
|
return nativeLauncher{}
|
|
}
|
|
|
|
type nativeLauncher struct{}
|
|
|
|
func (l nativeLauncher) OpenURL(url string) error {
|
|
return browser.OpenURL(url)
|
|
}
|