Repository navigation
fix: use latest in URL when version is empty - #1064
Conversation
When version is not specified (empty string), the getUrl function was generating invalid URLs like /releases/download/cs2pr without any version, which returned 404. This fix ensures that when version is empty or 'latest', the URL includes '/latest/' which GitHub handles correctly with a redirect to the actual latest release. Fixes #1063
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1064 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 852 853 +1
Branches 302 303 +1
=========================================
+ Hits 852 853 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@theluckystrike Thanks! |
|
thank you! |
|
@shivammathur, thanks for merging #1064 back in March. Tools set up without a version now download from the releases/latest path instead of a URL that returned 404. Seeing it merged tells me the effort counted. If a small one-time sponsorship ever appeals, https://github.com/sponsors/theluckystrike is where it goes, and https://github.com/theluckystrike lists the rest of my work. It'd be a quiet signal that the effort was welcome, and setup-php would keep getting fixes from me, though it's completely fine if not. Thank you, |
|
@shivammathur, thanks for the thumbs up, and thanks again for merging #1064. Since that change, setup-php builds the tool URL from releases/latest when no version is given, so those installs don't hit a 404 anymore. Appreciate you reading the note. Thank you, |
Fixes #1063
When version is not specified (empty string), the getUrl function was generating invalid URLs like without any version, which returned 404.
This fix ensures that when version is empty or 'latest', the URL includes '/latest/' which GitHub handles correctly with a redirect to the actual latest release.
Contributed by theluckystrike | Zovo — Chrome Extension Studio