Skip to content

Commit

Permalink
Support audit files which use \r or \r\n as newline character (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozillazg committed Jun 16, 2020
1 parent aada33f commit b26c4be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kube/resources.go
Expand Up @@ -74,7 +74,7 @@ func CreateResourceProviderFromPath(directory string) (*ResourceProvider, error)
logrus.Errorf("Error reading file: %v", path)
return err
}
specs := regexp.MustCompile("\n-+\n").Split(string(contents), -1)
specs := regexp.MustCompile("[\r\n]-+[\r\n]").Split(string(contents), -1)
for _, spec := range specs {
if strings.TrimSpace(spec) == "" {
continue
Expand Down

0 comments on commit b26c4be

Please sign in to comment.