cmd/promtool: resolve rule files relative to config file

pull/874/head
Fabian Reinartz 10 years ago
parent feb8a03503
commit 7e615dcdf0

@ -84,6 +84,10 @@ func checkConfig(t cli.Term, filename string) ([]string, error) {
}
var ruleFiles []string
for _, rf := range cfg.RuleFiles {
if !filepath.IsAbs(rf) {
rf = filepath.Join(filepath.Dir(filename), rf)
}
rfs, err := filepath.Glob(rf)
if err != nil {
return nil, err

Loading…
Cancel
Save