mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-22 14:14:54 -04:00
fix(make): fail the protoc download on an HTTP error (#12187)
`make protoc` fetched the protoc release with `curl -L` and no `-f`. When GitHub answered with an error, curl saved the error page as protoc.zip and exited 0, and the build then failed at unzip with "cannot find zipfile directory", which points at the archive rather than at the download. This happened for real: GitHub answered a CI cluster with a 504 for release downloads for over an hour, and every backend build that runs `make protogen-go` failed with the unzip message. `-f` makes curl fail on the HTTP status and write nothing, so the error names the real cause. `--retry-all-errors` also retries HTTP errors, which rides out a short blip; a longer outage still fails, now with the right message. Assisted-by: Claude:claude-opus-5 [Claude Code] Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 parent
c0b7e64973
commit
618f7d66ca
1 file changed
+1
-1
@@ -576,7 +576,7 @@ protoc:
|
||||
echo "Unsupported OS: $$OS_NAME"; exit 1; \
|
||||
fi; \
|
||||
URL=https://github.com/protocolbuffers/protobuf/releases/download/v31.1/$$FILE; \
|
||||
curl -L $$URL -o protoc.zip && \
|
||||
curl -fsSL --retry 5 --retry-all-errors --retry-delay 5 $$URL -o protoc.zip && \
|
||||
unzip -j -d $(CURDIR) protoc.zip bin/protoc && rm protoc.zip
|
||||
|
||||
.PHONY: protogen-go
|
||||
|
||||
Reference in new issue
Block a user