fix(git): review follow-ups for #1357 (S1, S2, indent)
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
S1: get_gitea_login_for_repo_override() now distinguishes "tea is not installed" from "no tea login named X exists", mirroring the host path. The old message diagnosed a cause that was never checked and pointed at seat-logins.sh, which cannot run without tea. Branch 6 in test-gitea-login-resolution.sh pins it (tea removed from PATH); reverting the fix fails that branch. S2: issue-list/pr-list/pr-view override-path error now points at the lines above for the cause instead of suggesting a default tea login. verify-release.mjs: indent of the #1356 test line fixed (cosmetic).
This commit is contained in:
@@ -468,6 +468,14 @@ get_gitea_login_for_repo_override() {
|
||||
echo "$canon"
|
||||
return 0
|
||||
fi
|
||||
# Same split as the host path above (#1357 S1): a missing tea binary
|
||||
# is not a missing login, and the "create it with" advice cannot be
|
||||
# followed without tea.
|
||||
if ! command -v tea >/dev/null 2>&1; then
|
||||
echo "Error: git identity '$ident' (via $ident_src) requested for owner '${owner%%/*}', but tea is not installed," >&2
|
||||
echo " so no login can be resolved. Refusing to guess an identity." >&2
|
||||
return 1
|
||||
fi
|
||||
echo "Error: git identity '$ident' (via $ident_src) has no tea login '$canon' for owner '${owner%%/*}'." >&2
|
||||
echo " Create it with: ~/.config/mosaic/tools/fleet/seat-logins.sh --apply --seat $ident" >&2
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user