diff --git a/packages/mosaic/framework/tools/git/detect-platform.sh b/packages/mosaic/framework/tools/git/detect-platform.sh index 14efab5e..c293f2e7 100755 --- a/packages/mosaic/framework/tools/git/detect-platform.sh +++ b/packages/mosaic/framework/tools/git/detect-platform.sh @@ -353,6 +353,14 @@ get_gitea_login_for_host() { echo "$canon" return 0 fi + # Say which of the two it is. "No such login" when tea is simply not + # installed is a diagnosis of a cause that was never checked, and it + # sends the reader off to create a login they cannot create. + if ! command -v tea >/dev/null 2>&1; then + echo "Error: git identity '$ident' requested (via $ident_src) for host '$host', 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' requested (via $ident_src) for host '$host', but no tea login named '$canon' exists." >&2 echo " Refusing to borrow another login. Acting as a different identity would satisfy gate 16 mechanically while violating it." >&2 echo " Create it with: ~/.config/mosaic/tools/fleet/seat-logins.sh --apply --seat $ident" >&2