Skip to content

Commit

Permalink
Merge pull request #302 from zaquestion/fix_browse
Browse files Browse the repository at this point in the history
fix #271 (lab mr browse break) and fix #300 (lab alias is actually hub alias)
  • Loading branch information
zaquestion authored Mar 21, 2019
2 parents 5c82aaf + 6f56975 commit 7bdcb20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/mr_browse.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"strconv"

"github.com/spf13/cobra"
"github.com/spf13/viper"
gitlab "github.com/xanzy/go-gitlab"
git "github.com/zaquestion/lab/internal/git"
lab "github.com/zaquestion/lab/internal/gitlab"
Expand All @@ -24,10 +23,7 @@ var mrBrowseCmd = &cobra.Command{
log.Fatal(err)
}

c := viper.AllSettings()["core"]
config := c.([]map[string]interface{})[0]
host := config["host"].(string)

host := lab.Host()
hostURL, err := url.Parse(host)
if err != nil {
log.Fatal(err)
Expand Down
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ func Execute() {
if os.Args[1] == "browse" {
log.Fatalf("Please call `hub browse` directly for github, the lab equivalent is `lab <object> browse`")
}
if os.Args[1] == "alias" {
log.Fatalf("Please call `hub alias` directly for github, there is no lab equivalent`")
}

// Passthrough to git for any unrecognized commands
err = git.New(os.Args[1:]...).Run()
Expand Down

0 comments on commit 7bdcb20

Please sign in to comment.