Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 669f2ca

Browse files
committed
Discard output of browser pkg
1 parent 8ea2920 commit 669f2ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cli/login.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,5 +219,10 @@ func openURL(urlToOpen string) error {
219219
return exec.Command(cmd, args...).Start()
220220
}
221221

222+
// Hide output from the browser library,
223+
// otherwise we can get really verbose and non-actionable messages
224+
// when in SSH or another type of headless session
225+
browser.Stderr = ioutil.Discard
226+
browser.Stdout = ioutil.Discard
222227
return browser.OpenURL(urlToOpen)
223228
}

0 commit comments

Comments
 (0)