mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 11:27:29 +00:00
depot/download: let curl fail on 404 response
Downloading non-existent archives from 'depot.genode.org' leads to files in the 'public' directory containing the 404 error website delivered by the HTTP server. Specifying the '--fail' option results in curl generating an exit-code that leads to the appropriate action by the tool, e.g.: Error: failed to download 'https://depot.genode.org/user/pkg/x/version.tar.xz' Issue #4865.
This commit is contained in:
parent
3fa275354d
commit
bab90d4837
@ -110,7 +110,7 @@ file_url = '${URL($(call archive_user,$1))}/$1'
|
||||
$(PUBLIC_DIR)/%:
|
||||
@$(ECHO) "$(DARK_COL)download$(DEFAULT_COL) $*"
|
||||
$(VERBOSE)mkdir -p $(dir $@)
|
||||
$(VERBOSE)curl --silent $(call file_url,$*) -o $@ ||\
|
||||
$(VERBOSE)curl --fail --silent $(call file_url,$*) -o $@ ||\
|
||||
(echo "Error: failed to download $(call file_url,$*)"; rm -f $@; false)
|
||||
|
||||
$(MAKECMDGOALS): $(TARGETS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user