fix(b3): eliminate command -v herdr bash function false positive in preflight checks (100% PASS)
This commit is contained in:
@@ -34,7 +34,10 @@ Before doing anything, verify the environment:
|
||||
|
||||
```bash
|
||||
# 1) herdr available and isolated server status
|
||||
command -v herdr || { echo "ERROR: herdr not installed"; exit 1; }
|
||||
# Use lib.sh's has_real_herdr, NOT `command -v herdr` / `type -P herdr`: once
|
||||
# lib.sh is sourced the former matches its herdr() function and the latter
|
||||
# matches the .mam/shim wrapper, so both pass on a host with no herdr (B-3).
|
||||
has_real_herdr || { echo "ERROR: herdr not installed"; exit 1; }
|
||||
echo "Herdr session name: ${HERDR_SESSION_NAME:-default}"
|
||||
|
||||
# 2) claude / agy available
|
||||
|
||||
@@ -81,7 +81,9 @@ fi
|
||||
[ -n "$AGENT" ] || { echo "ERROR: --agent required" >&2; usage; exit 2; }
|
||||
[ -n "$ROLE" ] || { echo "ERROR: --role required" >&2; usage; exit 2; }
|
||||
[ -d "$WORKSPACE" ] || { echo "ERROR: workspace $WORKSPACE not a directory" >&2; exit 1; }
|
||||
command -v herdr >/dev/null || type -P herdr >/dev/null || { echo "ERROR: herdr not installed" >&2; exit 1; }
|
||||
# B-3: `command -v herdr` matches lib.sh's herdr() function and `type -P herdr`
|
||||
# matches the .mam/shim wrapper, so both pass with no herdr installed.
|
||||
has_real_herdr || { echo "ERROR: herdr not installed" >&2; exit 1; }
|
||||
command -v "$AGENT" >/dev/null || { echo "ERROR: $AGENT CLI not in PATH" >&2; exit 1; }
|
||||
|
||||
# Auth Check (OAuth check for agy, loggedIn check for claude, status for hermes)
|
||||
|
||||
Reference in New Issue
Block a user