diff --git a/nix/deps/gradle/url2json.sh b/nix/deps/gradle/url2json.sh index d7f1c75095..d89fafc9f9 100755 --- a/nix/deps/gradle/url2json.sh +++ b/nix/deps/gradle/url2json.sh @@ -46,7 +46,7 @@ function fetch_and_template_file() { OBJ_URL="${REPO_URL}/${PKG_PATH}/${FILENAME}" if ! OBJ_NIX_FETCH_OUT=$(nix_fetch "${OBJ_URL}"); then echo " ! Failed to fetch: ${OBJ_URL}" >&2 - exit 1 + return 1 fi OBJ_NAME="${FILENAME}" @@ -58,6 +58,10 @@ function fetch_and_template_file() { }" } +function fetch_and_template_file_no_fail() { + fetch_and_template_file "${1}" 2>/dev/null || true +} + if [[ -z "${1}" ]]; then echo "Required POM URL argument not given!" >&2 exit 1 @@ -111,7 +115,7 @@ echo -ne " }" # Some deps are just POMs, in which case there is no JAR to fetch. -[[ "${OBJ_TYPE}" == "" ]] && fetch_and_template_file "${PKG_NAME}.jar" +[[ "${OBJ_TYPE}" == "" ]] && fetch_and_template_file_no_fail "${PKG_NAME}.jar" [[ "${OBJ_TYPE}" == "jar" ]] && fetch_and_template_file "${PKG_NAME}.jar" [[ "${OBJ_TYPE}" == "bundle" ]] && fetch_and_template_file "${PKG_NAME}.jar" [[ "${OBJ_TYPE}" =~ aar* ]] && fetch_and_template_file "${PKG_NAME}.aar"