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

Commit

Permalink
install with ./...
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Dec 1, 2015
1 parent 3bd6544 commit f4cb457
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions install.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"os"
"os/exec"
"path"
"path/filepath"
"regexp"
"strings"
Expand Down Expand Up @@ -156,7 +157,7 @@ func (gom *Gom) Clone(args []string) error {
}
}
cmdArgs = append(cmdArgs, args...)
cmdArgs = append(cmdArgs, gom.name)
cmdArgs = append(cmdArgs, gom.name+"/...")

fmt.Printf("downloading %s\n", gom.name)
return run(cmdArgs, Blue)
Expand Down Expand Up @@ -240,7 +241,18 @@ func (gom *Gom) Checkout() error {
}

func (gom *Gom) Build(args []string) error {
installCmd := append([]string{"go", "install"}, args...)
installCmd := []string{"go", "install"}
hasPkg := false
for _, arg := range args {
if !strings.HasPrefix(arg, "-") {
arg = path.Join(arg, "...")
hasPkg = true
}
installCmd = append(installCmd, arg)
}
if !hasPkg {
installCmd = append(installCmd, "./...")
}
vendor, err := filepath.Abs(vendorFolder)
if err != nil {
return err
Expand Down

0 comments on commit f4cb457

Please sign in to comment.