Skip to content

cache file exists function doesn't respect url replacements #4847

@viceice

Description

@viceice

please support redirect/replace https://dl.google.com/go
in some company intranet,unable to access dl.google.com directly

already supported

As I understand it- the new tools(v2) are downloading Golang from https://github.com/containerbase/ -

base_url="https://github.com/containerbase/${name}-prebuild/releases/download"
and if it has the chance to hit the get_from_url function, the typescript code will replace the urls, but file_exists
checksum_exists=$(file_exists "${base_url}/${version}/${name}-${version}-${arch}.tar.xz.sha512")
which comes before it uses curl directly
function file_exists () {
curl -sSLIo /dev/null -w "%{http_code}" "${1}"
}
and will fail the download. Do I need to write a new bug report about this or it could be handled in this bug? And what is the best way to resolve it - for now I just replaced the line with get_from_url and the check with -f on the file

Originally posted by @gergan in #1067

Metadata

Metadata

Assignees

Labels

priority-1-criticalA bad bug or work that is holding up a lot of other important features or fixesstatus:in-progressSomeone is working on implementationtype:bugBug fix of existing functionality

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions