# Waypoint hook problem

**URL:** <https://discuss.hashicorp.com/t/waypoint-hook-problem/29337>\
**Category:** Waypoint\
**Created:** [September 9, 2021, 3:39pm UTC](https://discuss.hashicorp.com/t/waypoint-hook-problem/29337 "2021-09-09T15:39:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gil.gateway1](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/gil.gateway1/32/19471_2.png) [@gil.gateway1](https://discuss.hashicorp.com/u/gil.gateway1)\
**Post date:** [September 9, 2021, 3:39pm UTC](https://discuss.hashicorp.com/t/waypoint-hook-problem/29337/1 "2021-09-09T15:39:55Z")

</div>

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](https://global.discourse-cdn.com/hashicorp/original/3X/c/a/cae0def0efd24b4a7c7057bcea9b68c6af8aa3ba.jpeg)

version,

CLI: v0.5.1
