diff --git a/scripts/start-spiget b/scripts/start-spiget index 4024ed92..1fd73e59 100755 --- a/scripts/start-spiget +++ b/scripts/start-spiget @@ -88,7 +88,7 @@ downloadResourceFromSpiget() { resource=${1?} 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" if externalUrl=$(get --json-path '$.file.externalUrl' "${resourceUrl}"); then log " Visit $externalUrl to pre-download the resource" diff --git a/scripts/start-utils b/scripts/start-utils index b6c2f1da..fe0e2780 100755 --- a/scripts/start-utils +++ b/scripts/start-utils @@ -197,6 +197,14 @@ function 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() { for f in "${@}"; do if [[ ${FAMILY^^} == "${f^^}" ]]; then