Skip to content

Commit 061d979

Browse files
[PATCH] Implemented groundwork for #191.
Changes in file tests/check_pip: - refactored navigate_git_dir logic
1 parent e6e32d0 commit 061d979

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/check_pip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,17 @@ function navigate_dirs_by_git() {
257257
if _TEST_ROOT_DIR=$(git rev-parse --show-superproject-working-tree 2>/dev/null); then
258258
if [ -z "${_TEST_ROOT_DIR}" ]; then
259259
_TEST_ROOT_DIR=$(git rev-parse --show-toplevel 2>/dev/null)
260+
if [ -z "${_TEST_ROOT_DIR}" ]; then
261+
printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=${FUNCNAME:-$0}::%s\n" "FAIL: Could not determine repository root" >&2
262+
EXIT_CODE=40
263+
return ${EXIT_CODE}
264+
fi
260265
fi
261266
printf "::debug::%s\n" "Found ${_TEST_ROOT_DIR} ..." ;
262267
else
263268
printf "::error file=${SCRIPT_FILE},line=${BASH_LINENO:-0},title=${FUNCNAME:-$0}::%s\n" "FAIL: missing valid repository or source structure" >&2
264269
EXIT_CODE=40
270+
return ${EXIT_CODE}
265271
fi
266272
}
267273

0 commit comments

Comments
 (0)