Skip to content

Fix check if version and quality are not specified#286

Merged
YuliiaKovalova merged 1 commit intodotnet:mainfrom
SteveL-MSFT:fix-version-quality
Jun 22, 2022
Merged

Fix check if version and quality are not specified#286
YuliiaKovalova merged 1 commit intodotnet:mainfrom
SteveL-MSFT:fix-version-quality

Conversation

@SteveL-MSFT
Copy link
Copy Markdown
Contributor

@SteveL-MSFT SteveL-MSFT commented Jun 22, 2022

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 if statement doesn't do this correctly, it's comparing only if --version latest isn't specified and -n does the opposite of checking if --quality is empty.

Used https://linuxhint.com/testing_strings_bash_z_n as a resource on the difference of now -n and -z works for bash if statement for strings. Where -n returns true if the string is NOT null, and -z returns true if the string IS null.

Note that are other usage of -n in 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.

@YuliiaKovalova YuliiaKovalova merged commit fc0b11b into dotnet:main Jun 22, 2022
@SteveL-MSFT SteveL-MSFT deleted the fix-version-quality branch June 22, 2022 13:56
@SteveL-MSFT
Copy link
Copy Markdown
Contributor Author

@YuliiaKovalova please add a test to cover the case where both --version and --quality is used with dotnet-install.sh

@SteveL-MSFT
Copy link
Copy Markdown
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

@SteveL-MSFT
Copy link
Copy Markdown
Contributor Author

@YuliiaKovalova please let me know what needs to be done to get this published to the download site. Thanks.

@YuliiaKovalova
Copy link
Copy Markdown
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 will bring you a decision on Monday.

I apologize for delay.

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.

dotnet-install.sh no longer working with both --version and --quality specified

2 participants