Repository navigation
fix(dockerfile): resolve nvm release without GitHub API, show curl errors, fixes #6 - #7
Merged
Merged
Conversation
…rors ## Short Summary (TL;DR) Get the latest nvm tag from the `releases/latest` redirect instead of the rate-limited GitHub API, and stop hiding curl errors during the build. ## The Issue - Fixes #6 The build used `api.github.com` (60 unauthenticated requests/hour per IP) to find the latest nvm tag. When the limit was hit, `curl --silent` hid the 403 and the build failed with only exit code 22. ## How This PR Solves The Issue - Read the tag from the `https://github.com/nvm-sh/nvm/releases/latest` redirect, which is not API rate-limited - Check that the tag looks like `vX.Y.Z` and fail with a clear message otherwise - Use `curl -fsS --retry 3` so HTTP errors are printed - Download `install.sh` to a file before running it, so a failed download doesn't pipe a partial script into bash ## Manual Testing Instructions ```bash ddev add-on get ddev/ddev-nvm --pr 7 ddev restart ddev nvm --version ``` ## Automated Testing Overview No new tests, the existing tests cover the build. ## Release/Deployment Notes None. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short Summary (TL;DR)
Get the latest nvm tag from the
releases/latestredirect instead of the rate-limited GitHub API, and stop hiding curl errors during the build.The Issue
ddev restart#6The build used
api.github.com(60 unauthenticated requests/hour per IP) to find the latest nvm tag. When the limit was hit,curl --silenthid the 403 and the build failed with only exit code 22.How This PR Solves The Issue
https://github.com/nvm-sh/nvm/releases/latestredirect, which is not API rate-limitedvX.Y.Zand fail with a clear message otherwisecurl -fsS --retry 3so HTTP errors are printedinstall.shto a file before running it, so a failed download doesn't pipe a partial script into bashManual Testing Instructions
Automated Testing Overview
No new tests, the existing tests cover the build.
Release/Deployment Notes
None.