Skip to content

Commit

Permalink
Test absolute path for gossfile loading (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
oholiab authored and aelsabbahy committed Aug 30, 2016
1 parent 7832192 commit d24a81a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion store.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ func mergeJSONData(gossConfig GossConfig, depth int, path string) GossConfig {
}

for _, g := range gossConfig.Gossfiles {
fpath := filepath.Join(path, g.ID())
var fpath string
if strings.HasPrefix(g.ID(), "/") {
fpath = g.ID()
} else {
fpath = filepath.Join(path, g.ID())
}
fdir := filepath.Dir(fpath)
j := mergeJSONData(ReadJSON(fpath), depth, fdir)
gossConfig = mergeGoss(gossConfig, j)
Expand Down

0 comments on commit d24a81a

Please sign in to comment.