Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #89 from uhamc/subgroup
Browse files Browse the repository at this point in the history
support private repo address with subgroups for gom install
  • Loading branch information
mattn authored May 21, 2018
2 parents 3794775 + 7ff383e commit ffd4fbe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion install.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ func (gom *Gom) pullPrivate(srcdir string) (err error) {

func (gom *Gom) clonePrivate(srcdir string) (err error) {
name := strings.Split(gom.name, "/")
privateUrl := fmt.Sprintf("git@%s:%s/%s", name[0], name[1], name[2])
if len(name) < 3 {
return errors.New("the format of private repo address is wrong")
}
nameTail := strings.Join(name[2:], "/")
privateUrl := fmt.Sprintf("git@%s:%s/%s", name[0], name[1], nameTail)

fmt.Printf("fetching private repo %s\n", gom.name)
cloneCmd := []string{"git", "clone", privateUrl, srcdir}
Expand Down

0 comments on commit ffd4fbe

Please sign in to comment.