fix lapi context add to allow helpers

This commit is contained in:
alteredCoder 2023-09-21 11:33:53 +02:00
parent e4dcdd2572
commit 07e7323cb7

View file

@ -217,6 +217,10 @@ func NewLapiCmd() *cobra.Command {
}
func AddContext(key string, values []string) error {
if err := exprhelpers.Init(nil); err != nil {
return fmt.Errorf(err.Error())
}
if err := alertcontext.ValidateContextExpr(key, values); err != nil {
return fmt.Errorf("invalid context configuration :%s", err)
}