remove debug and allow helper in context

This commit is contained in:
alteredCoder 2023-09-29 15:44:30 +02:00
parent 4932a832fa
commit 281fbd739f
2 changed files with 4 additions and 2 deletions

View file

@ -218,6 +218,10 @@ func NewLapiCmd() *cobra.Command {
}
func AddContext(key string, values []string, targetFile 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)
}

View file

@ -758,7 +758,5 @@ func isFilePathInFolder(folderpath string, targetFilepath string) (bool, error)
if err != nil {
return false, err
}
log.Infof("F: %+v | T: %+v", folderpath, targetFilepath)
log.Infof("REAL POATH: %+v", relPath)
return !strings.Contains(relPath, ".."), nil
}