Skip to content
Permalink
Browse files

If no matched files were found, we throw an exception. (#348)

  • Loading branch information...
axot authored and aelsabbahy committed May 20, 2018
1 parent cc29f25 commit b1251f443fb629cb568cebd1f359a3d39e0a2618
Showing with 4 additions and 0 deletions.
  1. +4 −0 store.go
@@ -163,6 +163,10 @@ func mergeJSONData(gossConfig GossConfig, depth int, path string) GossConfig {
fmt.Printf("Error in expanding glob pattern: \"%s\"\n", err.Error())
os.Exit(1)
}
if matches == nil {
fmt.Printf("No matched files were found: \"%s\"\n", fpath)
os.Exit(1)
}
for _, match := range matches {
fdir := filepath.Dir(match)
j := mergeJSONData(ReadJSON(match), depth, fdir)

0 comments on commit b1251f4

Please sign in to comment.
You can’t perform that action at this time.