Waypoint hook problem

Hello,
Can someone help,

I have the following problem, when using the “hook” with an “on_failure” fail function.
I have a shell script, that is, the routine continues even with the error in the shell script.

code hook

hook {
    when = "before"
    command = [
     "./scripts/gradle.test.sh", "GRADLE TEST"]
     on_failure = "failure"

Screenshot_1

version,

CLI: v0.5.1