Throw error when continue in route root of Alertmanager config

This commit is contained in:
conorbroderick 2017-05-03 13:40:54 +01:00
parent 91a2b9d717
commit dc782f2dd4
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import (
"time"
"encoding/json"
"github.com/prometheus/common/model"
"gopkg.in/yaml.v2"
)
@ -51,6 +52,10 @@ func Load(s string) (*Config, error) {
return nil, errors.New("no route provided in config")
}
if cfg.Route.Continue {
return nil, errors.New("cannot have continue in root route")
}
cfg.original = s
return cfg, nil
}