Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Avoid shell browser launch under WSL

Neeraj Gupta5a5d6ae89d95
diff --git a/cli/utils/browser/browser.go b/cli/utils/browser/browser.go
index 7a2224b2c1..f5a9fab718 100644
--- a/cli/utils/browser/browser.go
+++ b/cli/utils/browser/browser.go
@@ -1,6 +1,7 @@
package browser
import (
+ "errors"
"os/exec"
"runtime"
"strings"
@@ -19,8 +20,7 @@ func OpenURL(url string) error {
args = []string{url}
default: // "linux", "freebsd", "openbsd", "netbsd"
if isWSL() {
- cmd = "cmd.exe"
- args = []string{"/c", "start", url}
+ return errors.New("automatic browser opening is unavailable under WSL; open the printed URL manually")
} else {
cmd = "xdg-open"
args = []string{url}