From: Ionut Balutoiu Date: Fri, 17 Feb 2023 11:38:43 +0000 (+0200) Subject: utils: fix ssh_exec function X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0d40a19fdd694d97b3a6437904359083fa104f7d;p=ceph-build.git utils: fix ssh_exec function We need to use `return` inside the function to properly return the exit code of the function. Using `exit` will abruptly exit the entire script, which is not what we want. Signed-off-by: Ionut Balutoiu --- diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index d898a413..cce078f9 100755 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -1690,7 +1690,7 @@ function ssh_exec() { if [[ $EXIT_CODE -eq 124 ]]; then echo "ERROR: ssh command timed out" fi - exit $EXIT_CODE + return $EXIT_CODE } }