diff --git a/internal/auth/callback.go b/internal/auth/callback.go index 40d99d4f..16885031 100644 --- a/internal/auth/callback.go +++ b/internal/auth/callback.go @@ -65,6 +65,7 @@ func (awh AuthWebHelper) openBrowserCmd(runtimeOS, url string) *exec.Cmd { switch runtimeOS { case "windows": cmd = "cmd" + url = "\"" + url + "\"" // Windows does not like "&" args = []string{"/c", "start"} case "darwin": cmd = "open" diff --git a/internal/auth/callback_test.go b/internal/auth/callback_test.go index 9723c3aa..3eb8506d 100644 --- a/internal/auth/callback_test.go +++ b/internal/auth/callback_test.go @@ -110,7 +110,7 @@ func TestOpenBrowserCmd(t *testing.T) { }, { runtimeOS: "windows", - expectedCmd: exec.Command("cmd", "/c", "start", "url"), + expectedCmd: exec.Command("cmd", "/c", "start", "\"url\""), }, }