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
599 stars 55 forks source link

MacOS installer #127

Open simonech opened 4 years ago

simonech commented 4 years ago

Now the installation for macOS is manual, and the instruction make you install the tool in the root of your profile. Maybe having a proper installer would be a good idea. Or as dotnet global tool?

steveoh commented 4 years ago

This should definitely use the dotnet tool install cli syntax. Or at least tell people where to put global tools in the instructions.

OS Path
Linux/macOS. $HOME/.dotnet/tools.
Windows %USERPROFILE%.dotnet\tools.

from the docs

sfoslund commented 4 years ago

Thanks for your feedback! Please see the note in our README on why this tool cannot be a dotnet global tool. As for a mac installer, this would definitely be a great enhancement for future iterations.

steveoh commented 4 years ago

@sfoslund yah that is an interesting problem i was not thinking of.

I would assume that could be guarded against? Like you don't allow uninstalling a runtime that is running the tool?

dotnet uninstall

would produce a list of items with the current runtime a different color to indicate it cannot be removed?

akshaybabloo commented 4 years ago

I think for now this should be put in homebrew cask?

sfoslund commented 4 years ago

Looping in @wli3

@steveoh it sounds like that would be a solution, but we don't have any plans to take that work on at the moment.

wli3 commented 4 years ago

It is possible to add an install for mac. On Windows, only installer should touch your Program Files folder, that's why we need to have an Windows installer.

dotnet tool install does not support RID (platform) specific packages. So it is not easy to add in short term.

For homebrew. Like other dotnet core packages, we encourage the community to maintain. Since it is not trivial to support an another delivery mechanism

simonech commented 4 years ago

@akshaybabloo it would be a "simple" formula, not a 'cask", since this is a CLI tool, not something with a GUI

akshaybabloo commented 4 years ago

@simonech or that

simonech commented 4 years ago

Still on this topic... the documentation on docs.microsoft.com says

The tool requires elevation to uninstall .NET Core SDKs and runtimes. Therefore, it should be installed in a write-protected directory such as C:\Program Files on Windows or /usr/local/bin on macOS.

While the instructions in the release page on Github makes you copy the file in the ~/ folder, which is the home folder of the user.

Not sure which is the correct one, but they should be consistent.