Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bk build being too trusting about filenames #321

Open
jhheider opened this issue Mar 14, 2024 · 0 comments
Open

bk build being too trusting about filenames #321

jhheider opened this issue Mar 14, 2024 · 0 comments

Comments

@jhheider
Copy link
Contributor

if we have

distributable:
  url: https://search.maven.org/remotecontent?filepath=org/flywaydb/flyway-commandline/{{version.raw}}/flyway-commandline-{{version.raw}}.tar.gz
  strip-components: 1

we get an error:
AlreadyExists: File exists (os error 17): mkdir '~/pantry/srcs/flywaydb.org-10.10.0'
because the file downloads as flywaydb.org-10.10.0.

i was assuming it was trusting the server about the filename, but it doesn't seem like that's the case:

$ curl -LI 'https://search.maven.org/remotecontent?filepath=org/flywaydb/flyway-commandline/10.10.0/flyway-commandline-10.10.0.tar.gz'
HTTP/1.1 302 Moved Temporarily
Date: Thu, 14 Mar 2024 18:50:56 GMT
Content-Type: text/html
Content-Length: 138
Connection: keep-alive
Server: nginx
Location: https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/10.10.0/flyway-commandline-10.10.0.tar.gz
X-request_uri: /remotecontent?filepath=org/flywaydb/flyway-commandline/10.10.0/flyway-commandline-10.10.0.tar.gz
X-query_string: filepath=org/flywaydb/flyway-commandline/10.10.0/flyway-commandline-10.10.0.tar.gz

HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 111526803
ETag: "e8a43977b1a9d667414c8c74c82494de"
Content-Type: application/x-gzip
Last-Modified: Thu, 14 Mar 2024 10:36:34 GMT
X-Checksum-MD5: e8a43977b1a9d667414c8c74c82494de
X-Checksum-SHA1: ef0c8c3aacb8fd541864050bc11f8c6a61a50158
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 18223
Date: Thu, 14 Mar 2024 18:50:56 GMT
X-Served-By: cache-iad-kjyo7100084-IAD, cache-bos4634-BOS
X-Cache: HIT, HIT
X-Cache-Hits: 12, 0
X-Timer: S1710442257.604597,VS0,VE1

still, it's getting downloaded to the same path we want to unpack to, which is causing problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant