Fixed issue with new and run flag

Updated tests to run final test in non gopath, with new name
This commit is contained in:
notzippy@gmail.com
2020-05-19 02:17:49 -07:00
parent 904cfa2995
commit 5070fb8be0
5 changed files with 18 additions and 8 deletions

View File

@@ -235,8 +235,8 @@ func (c *CommandConfig) InitPackageResolver() {
c.PackageResolver = func(pkgName string) error {
utils.Logger.Info("Request for package ", "package", pkgName, "use vendor", c.Vendored)
var getCmd *exec.Cmd
print("Downloading related packages ...")
if c.Vendored {
println("Downloading related packages")
getCmd = exec.Command(c.GoCmd, "mod", "tidy")
} else {
utils.Logger.Info("No vendor folder detected, not using dependency manager to import package", "package", pkgName)
@@ -246,10 +246,10 @@ func (c *CommandConfig) InitPackageResolver() {
utils.CmdInit(getCmd, !c.Vendored, c.AppPath)
utils.Logger.Info("Go get command ", "exec", getCmd.Path, "dir", getCmd.Dir, "args", getCmd.Args, "env", getCmd.Env, "package", pkgName)
output, err := getCmd.CombinedOutput()
println("Downloading related packages completed")
if err != nil {
utils.Logger.Error("Failed to import package", "error", err, "gopath", build.Default.GOPATH, "GO-ROOT", build.Default.GOROOT, "output", string(output))
}
println(" completed.")
return nil
}