Skip to content

Commit

Permalink
Remove envy dep (#17)
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
stanislas-m authored Feb 12, 2019
1 parent b2cb381 commit d4fc286
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 325 deletions.
7 changes: 4 additions & 3 deletions custom_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"io/ioutil"
"os"
"path/filepath"

"github.com/gobuffalo/envy"
)

func init() {
Expand All @@ -23,7 +21,10 @@ type CustomDataParser func(io.Reader) error

func loadCustomData(defaultFile, env, readErrorMessage string, parser CustomDataParser) {
pwd, _ := os.Getwd()
path := envy.Get(env, filepath.Join(pwd, defaultFile))
path, found := os.LookupEnv(env)
if !found {
path = filepath.Join(pwd, defaultFile)
}

if _, err := os.Stat(path); err != nil {
return
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gobuffalo/flect

require (
github.com/gobuffalo/envy v1.6.11
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/stretchr/testify v1.3.0
)
Loading

0 comments on commit d4fc286

Please sign in to comment.