dotnet / cli-lab

A guided tool will be provided to enable the controlled clean up of a system such that only the desired versions of the Runtime and SDKs remain.
MIT License
602 stars 55 forks source link

[NETSDKE2E][MAC] The option "-?" doesn’t work. #298

Closed v-xiaofchen closed 2 months ago

v-xiaofchen commented 3 months ago

To Reproduce 1.Prepare a clean MacOS. 2.install dotnet-core-uninstall(1.7.0) from tar

  1. Use the following commands to install the tool:
mkdir -p ~/dotnet-core-uninstall
tar -zxvf dotnet-core-uninstall.tar.gz -C ~/dotnet-core-uninstall
cd ~/dotnet-core-uninstall
./dotnet-core-uninstall list

4.Install 8.0.204(osx-x64) from https://dotnet.microsoft.com/en-us/download/dotnet/8.0

  1. Run "./dotnet-core-uninstall -h" 6.Run "./dotnet-core-uninstall -?' and observer

Expected Result: The option "-?" can work.

Actual Result: The option "-?" doesn’t work. image

vdanche commented 3 months ago

not repro on win11-x64 image

baronfel commented 2 months ago

This is a problem with the zsh shell used by the tester - zsh will attempt to expand the ? character as a wildcard so it doesn't find any matching commands. You can fix this by telling zsh to not glob via unsetopt nomatch. There are more details at https://github.com/ohmyzsh/ohmyzsh/issues/31.