Implement "browse" subcommand on Windows

This commit is contained in:
Claus Brod
2017-03-22 22:36:21 +01:00
parent 412174f8a9
commit f6230ca8c6
+2
View File
@@ -451,6 +451,8 @@ func (c *Cli) Browse(issue string) error {
return exec.Command("open", fmt.Sprintf("%s/browse/%s", c.endpoint, issue)).Run()
} else if runtime.GOOS == "linux" {
return exec.Command("xdg-open", fmt.Sprintf("%s/browse/%s", c.endpoint, issue)).Run()
} else if runtime.GOOS == "windows" {
return exec.Command("cmd", "/c", "start", fmt.Sprintf("%s/browse/%s", c.endpoint, issue)).Run()
}
}
return nil