remove debug and allow helper in context
This commit is contained in:
parent
4932a832fa
commit
281fbd739f
2 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue