提交 603a731a 编写于 作者: M Mislav Marohnić

[gist] Use first configured API hosts instead of prompting

If hub is configured with multiple hosts (usually including GitHub
Enterprise instances), every invocation to `hub gist` would prompt to
select a host. Assume that people want to use the first configured host
by default (they can change it via GITHUB_HOST).
上级 cb22257c
......@@ -114,7 +114,7 @@ func printGistHelp(command *Command, args *Args) {
func createGist(cmd *Command, args *Args) {
args.NoForward()
host, err := github.CurrentConfig().DefaultHost()
host, err := github.CurrentConfig().DefaultHostNoPrompt()
utils.Check(err)
gh := github.NewClient(host.Host)
......@@ -132,7 +132,7 @@ func createGist(cmd *Command, args *Args) {
func showGist(cmd *Command, args *Args) {
args.NoForward()
host, err := github.CurrentConfig().DefaultHost()
host, err := github.CurrentConfig().DefaultHostNoPrompt()
utils.Check(err)
gh := github.NewClient(host.Host)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册