-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
Description of problem:
When using tkn pac cel with an invalid CEL expression, the command correctly prints a CEL parse error, but still exits with status code 0
Prerequisites (if any, like setup, operators/versions):
tkn-pac 0.39.2
Steps to Reproduce
Valid Header and JSON body.
echo 'event =' | tkn pac cel -p gitlab \
-b testdata/cel/gitlab-mr-main-body.json \
-H testdata/cel/gitlab-mr-headers-plain.txt
echo 'event == "pull_request" ||' | tkn pac cel -p gitlab \
-b testdata/cel/gitlab-mr-main-body.json \
-H testdata/cel/gitlab-mr-headers-plain.txt
Actual results:
failed to parse expression "event =": ERROR: <input>:1:7: Syntax error: token recognition error at: '=' | event = | ......^
Errors with an exit code of 0.
Expected results:
Should error with an exit code of 1.