Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vektah committed Jul 13, 2018
1 parent 1066953 commit ea4f26c
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 40 deletions.
76 changes: 68 additions & 8 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion codegen/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ func findCfg() (string, error) {
}

cfg := findCfgInDir(dir)
for cfg == "" && dir != "/" {

for cfg == "" && dir != filepath.Dir(dir) {
dir = filepath.Dir(dir)
cfg = findCfgInDir(dir)
}
Expand Down
2 changes: 1 addition & 1 deletion codegen/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
func TestLoadConfig(t *testing.T) {
t.Run("config does not exist", func(t *testing.T) {
_, err := LoadConfig("doesnotexist.yml")
require.EqualError(t, err, "unable to read config: open doesnotexist.yml: no such file or directory")
require.Error(t, err)
})

t.Run("malformed config", func(t *testing.T) {
Expand Down
30 changes: 20 additions & 10 deletions example/dataloader/addressloader_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 17 additions & 10 deletions example/dataloader/itemsliceloader_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ea4f26c

Please sign in to comment.