mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-12 06:57:13 +00:00
Silence content type error for external spiget resources (#1431)
This commit is contained in:
1 parent
7f44a04490
commit
fda8981028
2 files changed
+9
-1
No files matched your search
@@ -88,7 +88,7 @@ downloadResourceFromSpiget() {
|
|||||||
resource=${1?}
|
resource=${1?}
|
||||||
|
|
||||||
resourceUrl="https://api.spiget.org/v2/resources/${resource}"
|
resourceUrl="https://api.spiget.org/v2/resources/${resource}"
|
||||||
if ! outfile=$(get --output-filename -o /tmp "${acceptArgs[@]}" "${resourceUrl}/download"); then
|
if ! outfile=$(get_silent --output-filename -o /tmp "${acceptArgs[@]}" "${resourceUrl}/download"); then
|
||||||
log "ERROR: failed to download resource '${resource}' from ${resourceUrl}/download"
|
log "ERROR: failed to download resource '${resource}' from ${resourceUrl}/download"
|
||||||
if externalUrl=$(get --json-path '$.file.externalUrl' "${resourceUrl}"); then
|
if externalUrl=$(get --json-path '$.file.externalUrl' "${resourceUrl}"); then
|
||||||
log " Visit $externalUrl to pre-download the resource"
|
log " Visit $externalUrl to pre-download the resource"
|
||||||
|
|||||||
@@ -197,6 +197,14 @@ function get() {
|
|||||||
mc-image-helper "${flags[@]}" get "$@"
|
mc-image-helper "${flags[@]}" get "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_silent() {
|
||||||
|
local flags=(-s)
|
||||||
|
if isTrue "${DEBUG_GET:-false}"; then
|
||||||
|
flags+=("--debug")
|
||||||
|
fi
|
||||||
|
mc-image-helper "${flags[@]}" get "$@"
|
||||||
|
}
|
||||||
|
|
||||||
function isFamily() {
|
function isFamily() {
|
||||||
for f in "${@}"; do
|
for f in "${@}"; do
|
||||||
if [[ ${FAMILY^^} == "${f^^}" ]]; then
|
if [[ ${FAMILY^^} == "${f^^}" ]]; then
|
||||||
|
|||||||
Reference in new issue
Block a user