diff options
Diffstat (limited to 'fs.go')
-rw-r--r-- | fs.go | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -208,11 +208,15 @@ func collectFromDir( // Process defaults for this directory if a defaults.toml is found defaultsPath := path.Join(dir, DEFAULTS) if info, err := os.Stat(defaultsPath); err == nil && !info.IsDir() { - d := DecodeDefaults(defaultsPath, cfgs) + d, err := DecodeDefaults(defaultsPath, cfgs) + + if err != nil { + log.Fatalf("Error encounter in %s: %v\n", defaultsPath, err); + } // inherit the properties not defined in this defaults if defaults != nil { - d.Inherit(defaults) + d.Inherit(*defaults) } defaults = &d @@ -240,7 +244,12 @@ func collectFromDir( } // Decode a unit - config := DecodeConfig(child, cfgs) + config, err := DecodeConfig(child, cfgs) + + if err != nil { + log.Fatalf("Error encountered in %s: %v", child, config) + } + config.Inherit(*defaults) tc := TestCase { |