Fix check if version and quality are not specified#286
Merged
YuliiaKovalova merged 1 commit intodotnet:mainfrom Jun 22, 2022
Merged
Fix check if version and quality are not specified#286YuliiaKovalova merged 1 commit intodotnet:mainfrom
YuliiaKovalova merged 1 commit intodotnet:mainfrom
Conversation
YuliiaKovalova
approved these changes
Jun 22, 2022
Contributor
Author
|
@YuliiaKovalova please add a test to cover the case where both --version and --quality is used with dotnet-install.sh |
Contributor
Author
|
Also need the new version published to https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh to unblock PowerShell team CI |
22 tasks
Contributor
Author
|
@YuliiaKovalova please let me know what needs to be done to get this published to the download site. Thanks. |
Member
|
Hi @SteveL-MSFT , Sorry, I am on medical leave this week and can't deploy these changes. @bekir-ozturk and I had a short conversation yesterday regarding this issue and it seems like presence of the both params are invalid according to new rules. I apologize for delay. |
YuliiaKovalova
added a commit
that referenced
this pull request
Jun 27, 2022
This reverts commit fc0b11b.
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.
Fix #285
This PR #278 introduced a check and based on the error message it seems to be validating that at least --version or --quality is specified. The current
ifstatement doesn't do this correctly, it's comparing only if--version latestisn't specified and-ndoes the opposite of checking if--qualityis empty.Used https://linuxhint.com/testing_strings_bash_z_n as a resource on the difference of now
-nand-zworks for bashifstatement for strings. Where-nreturns true if the string is NOT null, and-zreturns true if the string IS null.Note that are other usage of
-nin the script and I didn't validate if those are correct. I only tested this change locally that the way our CI uses dotnet-install.sh with both --version and --quality specified works.