Skip to content

Commit

Permalink
Merge pull request #146 from notzippy/develop
Browse files Browse the repository at this point in the history
Added missing environment variables to command, skipping the gopath
  • Loading branch information
notzippy authored Oct 2, 2018
2 parents f745fb3 + 43c188c commit be7bebd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
17 changes: 12 additions & 5 deletions revel/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,20 +307,27 @@ const (
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
required = ["github.com/revel/cmd/revel"]
required = ["github.com/revel/revel", "github.com/revel/modules"]
# Note to use a specific version changes this to
#
# [[override]]
# version = "0.20.1"
# name = "github.com/revel/modules"
[[override]]
branch = "master"
name = "github.com/revel/modules"
# Note to use a specific version changes this to
#
# [[override]]
# version = "0.20.0"
# name = "github.com/revel/revel"
[[override]]
branch = "master"
name = "github.com/revel/revel"
[[override]]
branch = "master"
name = "github.com/revel/cmd"
[[override]]
branch = "master"
name = "github.com/revel/log15"
Expand Down
9 changes: 8 additions & 1 deletion utils/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ func CmdInit(c *exec.Cmd, basePath string) {
c.Dir = basePath
// Go 1.8 fails if we do not include the GOROOT
c.Env = []string{"GOPATH=" + build.Default.GOPATH, "PATH=" + GetEnv("PATH"), "GOROOT="+ GetEnv("GOROOT")}

// Fetch the rest of the env variables
for _, e := range os.Environ() {
pair := strings.Split(e, "=")
if pair[0]=="GOPATH" {
continue
}
c.Env = append(c.Env,e)
}
}

// Returns an environment variable
Expand Down
4 changes: 2 additions & 2 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ package cmd

const (
// Version current Revel Command version
Version = "0.20.1"
Version = "0.20.2"

// BuildDate latest commit/release date
BuildDate = "2018-09-30"
BuildDate = "2018-10-02"

// MinimumGoVersion minimum required Go version for Revel
MinimumGoVersion = ">= go1.8"
Expand Down

0 comments on commit be7bebd

Please sign in to comment.