From 0d40a19fdd694d97b3a6437904359083fa104f7d Mon Sep 17 00:00:00 2001 From: Ionut Balutoiu Date: Fri, 17 Feb 2023 13:38:43 +0200 Subject: [PATCH] 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 --- scripts/build_utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } } -- 2.47.3