diff --git a/README.md b/README.md index 4c968b6..9e69f35 100644 --- a/README.md +++ b/README.md @@ -100,24 +100,6 @@ $ go get -u github.com/kyoshidajp/tosa 1. Put `tosa` where you want. 1. Add `tosa` path to `$PATH`. -## Configuration - -### Browser - -Add `browser` in `$HOME/.config/tosa`(which is YAML format). Like this. - -``` -github.com: -- user: your_account - oauth_token: your_oauth_token - protocol: https - browser: firefox -``` - -This config file is automatically generated when running without setting environment variable `GITHUB_TOKEN`. - -The value is a name or an absolute path. By default, used your system default browser. - ## Author [Katsuhiko YOSHIDA](https://github.com/kyoshidajp) diff --git a/cli.go b/cli.go index 2909791..ba43729 100644 --- a/cli.go +++ b/cli.go @@ -32,7 +32,6 @@ const ( ExitCodeParseFlagsError ExitCodeBadArgs ExitCodePullRequestNotFound - ExitCodeOpenPageError ) // Debugf prints debug output when EnvDebug is given @@ -167,23 +166,12 @@ func openPr(client *APIClient, sha string) int { return ExitCodePullRequestNotFound } - browser, err := GetBrowser() - if err != nil { - return ExitCodeOpenPageError - } - Debugf("browser: %s", browser) - url := *pr.HTMLURL Debugf("URL: %s", url) - var openErr error - if browser == "" { - openErr = open.Run(url) - } else { - openErr = open.RunWith(url, browser) - } + openErr := open.Run(url) if openErr != nil { - PrintErrorf("Could not open page. Check your browser and URL.") + PrintErrorf("Could not open page.") return ExitCodeError }