I have a bash function on one of our test servers that deploys our code, but one of the commands fails frequently and we can't find the cause. We just retry until it works.
I want to have the function retry if that command fails. In the function, I did something like this:
command_to_run || { echo "failed, retrying"; call_function; }
Which calls the function again like I would want, but it also allows the function to continue execution. How do I stop the execution of the current function before calling it again?