diff --git a/pkg/gomason/golang.go b/pkg/gomason/golang.go index c12e09d..e2aa295 100644 --- a/pkg/gomason/golang.go +++ b/pkg/gomason/golang.go @@ -168,14 +168,14 @@ func (Golang) Test(gopath string, gomodule string, timeout string) (err error) { log.Print("[DEBUG] Running 'go test -v ./...'.\n\n") - var timeoutArg string - + var cmd *exec.Cmd + // Things break if you pass in an arg that has an empty string. Splitting it up like this fixes https://github.com/nikogura/gomason/issues/24 if timeout != "" { - timeoutArg = fmt.Sprintf("-timeout %s", timeout) + cmd = exec.Command("go", "test", "-v", "-timeout", timeout, "./...") + } else { + cmd = exec.Command("go", "test", "-v", "./...") } - cmd := exec.Command("go", "test", "-v", timeoutArg, "./...") - runenv := append(os.Environ(), fmt.Sprintf("GOPATH=%s", gopath)) runenv = append(runenv, "GO111MODULE=on") diff --git a/pkg/gomason/gomason.go b/pkg/gomason/gomason.go index ce170e3..52a0542 100644 --- a/pkg/gomason/gomason.go +++ b/pkg/gomason/gomason.go @@ -15,7 +15,7 @@ import ( ) // VERSION is the current gomason version -const VERSION = "2.7.0" +const VERSION = "2.9.0" // METADATA_FILENAME The default gomason metadata file name const METADATA_FILENAME = "metadata.json"