chore(marmot-interop): check for protoc in preflight

nostr-rs-relay's build.rs needs protoc to compile the nauthz gRPC
definitions. Without it the build fails deep in prost-build with a
panic that's hard to read, so fail up front with a pointer to
`apt-get install protobuf-compiler`.

https://claude.ai/code/session_01M6dCKAF5Y1VyHGZPjzwDXq
This commit is contained in:
Claude
2026-04-21 22:06:59 +00:00
parent 51ad472046
commit bed3514700
+7 -2
View File
@@ -6,9 +6,14 @@
# --- preflight ---------------------------------------------------------------
preflight() {
banner "Preflight"
for cmd in jq git curl cargo; do
for cmd in jq git curl cargo protoc; do
if ! command -v "$cmd" >/dev/null 2>&1; then
fail_msg "missing required tool: $cmd"; exit 1
fail_msg "missing required tool: $cmd"
# protoc is a build-time dep of nostr-rs-relay — give a hint.
if [[ "$cmd" == "protoc" ]]; then
info "hint: apt-get install protobuf-compiler (or brew install protobuf on macOS)"
fi
exit 1
fi
info "$cmd: $(command -v "$cmd")"
done