From f3c9ab890516d076252cb5d818641e373df697f6 Mon Sep 17 00:00:00 2001 From: Joey Riches Date: Wed, 13 Dec 2023 18:42:45 +0000 Subject: [PATCH] common/Scripts: return 1 instead of exit 1 on err in helper.sh So it doesn't exit the shell. --- common/Scripts/helpers.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/Scripts/helpers.sh b/common/Scripts/helpers.sh index 7a9e487e72e..aecd04c0071 100755 --- a/common/Scripts/helpers.sh +++ b/common/Scripts/helpers.sh @@ -5,17 +5,17 @@ # This function will only work if this script is sourced # by your bash shell. function gotosoluspkgs() { - cd "$(dirname "$(readlink "${BASH_SOURCE[0]}")")/../../" || exit 1 + cd "$(dirname "$(readlink "${BASH_SOURCE[0]}")")/../../" || return 1 } # Goes to the root directory of the git repository function goroot() { - cd "$(git rev-parse --show-toplevel)" || exit 1 + cd "$(git rev-parse --show-toplevel)" || return 1 } # Push into a package directory function gotopkg() { - cd "$(git rev-parse --show-toplevel)"/packages/*/"$1" || exit 1 + cd "$(git rev-parse --show-toplevel)"/packages/*/"$1" || return 1 } # What provides a lib