Jump to content

Stop running workflow if exit code is non-zero


Recommended Posts

Well, in bash the exit code of the last run command is $?. Setting variables is a bit tricky because you need to echo JSON to do that, but you could use echo and a Filter Utility to stop the workflow:

./my_script.sh
if [[ $? != 0 ]]; then
    echo -n "FAILED"
fi

then a Filter:

 

image.png.0b7f68514294e13c84c4ab908e9f5950.png

Edited by deanishe
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...