Skip to content

Windows: Make sure the URL is fully formed before attempting to download #493

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

azharudd
Copy link

This should prevent the 404 errors when the URL is malformed due to dir and download fields missing.

@azharudd azharudd requested a review from shahmishal as a code owner August 12, 2025 20:21
@shahmishal
Copy link
Member

Please also update other windows Dockerfiles too.

@@ -130,6 +130,14 @@ RUN Write-Host -NoNewLine ('Downloading {0} ... ' -f ${env:VSB});
# Install Swift toolchain.
ARG SWIFT_RELEASE_METADATA=https://download.swift.org/development/windows10/latest-build.json
RUN $Release = curl.exe -sL ${env:SWIFT_RELEASE_METADATA} | ConvertFrom-JSON; \
Write-Host ('({0})' -f $Release); \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will dump the json to the console - fine for debugging, but shouldn't be committed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@compnerd Are there any concerns about dumping the JSON file to the console? The JSON file is just a few lines long. I’m intentionally doing this so that if there are any failures, we can see what it contained and help us understand why it doesn’t contain the expected values.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes it harder to see what is going on. If you want to do this at the end of the run if there are failures, that is fine, but we shouldn't do this in all cases IMO.

This should prevent the 404 errors when the URL is malformed due to
`dir` and `download` fields missing.
@azharudd
Copy link
Author

Please also update other windows Dockerfiles too.

Done!

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

Successfully merging this pull request may close these issues.

3 participants