mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Fixed issue with new and run flag
Updated tests to run final test in non gopath, with new name
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user