From 0bf563268c9ad219901fa6a298e36be10cede64b Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 21 Aug 2026 16:07:38 -0500 Subject: [PATCH] fix(#1356): distinguish 'tea not installed' from 'login missing' Self-review catch. The ladder reported "no tea login named X exists" when tea was simply absent -- a cause it never checked, sending the reader off to create a login they have no tool to create. Same defect class as the one just filed as #1357, so shipping a fresh instance of it in this PR would be poor form. --- packages/mosaic/framework/tools/git/detect-platform.sh | 8 ++++++++ 1 file changed, 8 insertions(+) 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