Consistently print browsed URL across commands

This commit is contained in:
Mislav Marohnić 2020-09-09 17:02:02 +02:00
parent 3d58fa785f
commit fda9659e4a
2 changed files with 4 additions and 2 deletions

View file

@ -83,7 +83,9 @@ func viewRun(opts *ViewOptions) error {
openURL := issue.URL
if opts.WebMode {
fmt.Fprintf(opts.IO.ErrOut, "Opening %s in your browser.\n", openURL)
if opts.IO.IsStdoutTTY() {
fmt.Fprintf(opts.IO.ErrOut, "Opening %s in your browser.\n", utils.DisplayURL(openURL))
}
return utils.OpenInBrowser(openURL)
}
if opts.IO.IsStdoutTTY() {

View file

@ -94,7 +94,7 @@ func viewRun(opts *ViewOptions) error {
if opts.BrowserMode {
if connectedToTerminal {
fmt.Fprintf(opts.IO.ErrOut, "Opening %s in your browser.\n", openURL)
fmt.Fprintf(opts.IO.ErrOut, "Opening %s in your browser.\n", utils.DisplayURL(openURL))
}
return utils.OpenInBrowser(openURL)
}