Repository navigation
Reject one-part channels with a clear error - #748
Open
celinhodaltro wants to merge 1 commit into
Open
celinhodaltro wants to merge 1 commit into
celinhodaltro wants to merge 1 commit into
Conversation
A one-part channel such as `-c 10` reached the release metadata lookup and failed with "Failed to resolve the exact version number.", which does not say what was wrong or what to use instead (issue dotnet#686). Both scripts now reject the value right after normalization and list the supported formats, including the two-part form to use instead. Fix dotnet#686
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.
Fixes #686.
-c 10went all the way to the release metadata lookup and came back withFailed to resolve the exact version number.-- no hint about the format being wrong, no hint about what to type instead.-c 11did the same thing today, so anyone reaching for the newest major version hits it too.Both scripts now reject a one-part numeric channel right after normalization, next to the existing
release/*warning:Get-NormalizedChannelthrows the same style of message used for-Quality,-Runtime,--osand--quality, andget_normalized_channelprints it withsay_errand returns 1, which the assignment incalculate_varsturns into an exit underset -e.Nothing else changes:
STS,LTS,A.B,A.B.Cxxand the deprecatedrelease/*form take the same path as before.What it looks like now:
And the paths that must keep working, run with
--dry-run:dotnet-install.ps1dotnet-install.sh10.010.0.1xxSTSOn the test side,
ScriptEncodingTestspasses 2/2 (the.ps1stayed CRLF and the.shstayed LF) andGivenThatIWantToGetTheSdkLinksFromAScript, which shells out to both scripts for each version/channel combination, passes 143 with 8 skipped and 0 failures.