Skip to content

Commit b60903c

Browse files
committed
no-mistakes: apply CI fixes
1 parent df74687 commit b60903c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/fm-account-routing.test.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ SH
196196
if [ "${1:-}" = return ] && [ -n "${FM_EXPECT_CHECKOUT_LOCK_ROOT:-}" ]; then
197197
lock_owner=${FM_PROCESS_TREE_GUARD_FILE%/process-group}
198198
[ -d "$lock_owner" ] && [ ! -L "$lock_owner" ] || exit 91
199+
lock_owner=$(cd "$lock_owner" 2>/dev/null && pwd -P) || exit 91
199200
lock_owner_parent=$(cd "$(dirname "$lock_owner")" 2>/dev/null && pwd -P) || exit 91
200201
expected_lock_root=$(cd "$FM_EXPECT_CHECKOUT_LOCK_ROOT" 2>/dev/null && pwd -P) || exit 91
201202
[ "$lock_owner_parent" = "$expected_lock_root" ] || exit 91
@@ -206,7 +207,13 @@ if [ "${1:-}" = return ] && [ -n "${FM_EXPECT_CHECKOUT_LOCK_ROOT:-}" ]; then
206207
lock_link=
207208
for candidate in "$expected_lock_root"/*.lock; do
208209
[ -L "$candidate" ] || continue
209-
[ "$(readlink "$candidate" 2>/dev/null)" = "$lock_owner" ] || continue
210+
candidate_owner=$(readlink "$candidate" 2>/dev/null) || continue
211+
case "$candidate_owner" in
212+
/*) ;;
213+
*) candidate_owner=$(dirname "$candidate")/$candidate_owner ;;
214+
esac
215+
candidate_owner=$(cd "$candidate_owner" 2>/dev/null && pwd -P) || continue
216+
[ "$candidate_owner" = "$lock_owner" ] || continue
210217
lock_link=$candidate
211218
break
212219
done

0 commit comments

Comments
 (0)