1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-30 19:35:06 +00:00

fix: jmespath random error handling (#4697)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-09-26 15:33:52 +02:00 committed by GitHub
parent 7209445cd3
commit 6a8085522a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -961,7 +961,7 @@ func jpRandom(arguments []interface{}) (interface{}, error) {
rand.Seed(time.Now().UnixNano())
ans, err := regen.Generate(pattern)
if err != nil {
fmt.Println("Invalid Pattern: ", err)
return nil, err
}
return ans, nil
}