support yml file (#1605)

This commit is contained in:
AlteredCoder 2022-06-22 17:01:27 +02:00 committed by GitHub
parent 628d7be1d8
commit a4f4eabf0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -153,7 +153,7 @@ func LoadBuckets(cscfg *csconfig.CrowdsecServiceCfg, files []string, tomb *tomb.
response = make(chan types.Event, 1)
for _, f := range files {
log.Debugf("Loading '%s'", f)
if !strings.HasSuffix(f, ".yaml") {
if !strings.HasSuffix(f, ".yaml") && !strings.HasSuffix(f, ".yml") {
log.Debugf("Skipping %s : not a yaml file", f)
continue
}

View file

@ -43,7 +43,7 @@ func LoadStages(stageFiles []Stagefile, pctx *UnixParserCtx, ectx EnricherCtx) (
pctx.Stages = []string{}
for _, stageFile := range stageFiles {
if !strings.HasSuffix(stageFile.Filename, ".yaml") {
if !strings.HasSuffix(stageFile.Filename, ".yaml") && !strings.HasSuffix(stageFile.Filename, ".yml") {
log.Warningf("skip non yaml : %s", stageFile.Filename)
continue
}