-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API to get global tools path #6260
Comments
Dup of #6253. Deduping that in favor of this one, so it's easier to track for you. |
Clarified with Rob, here the ask is actually to just return the GlobalPackageFolder location specified in the "Machine-Wide" config. I'm not sure any of the points listed in the original issue are a concern. Will clarify offline if we want to have this as an MSBuild target, or just use the already existing APIs. |
We need talk more about this problem. We need an API similar to https://github.com/dotnet/cli/blob/55f62d9d646b558d53c56e226a9ddc3dc003a23b/src/Microsoft.DotNet.Configurer/CliFolderPathCalculator.cs#L44 And as the issue stated, it cannot simply return the full path. |
@wli3 Can you please try the following
|
We do need to think more and decide where to put the logic. In the end, this should not be allowed. Also, I was about to talk about it yesterday, tools folder should be at least per user (ideally it can only be in user's folder) like |
I am thinking can we not allow this to be set? Or only allow setting the part after user directly. The validation logic will be very hard. If we move most of this logic to CLI, it won't help too much. CLI will ask for a list of candidate and validate from top to bottom until finding one or throws. However, NuGet will have no idea which one CLI actually picked. And the worst part is, the user changed the config. The candidate list changed, the new location is not deterministic. Also, what to do with existing tools. Should we migrate them after tools location changed |
@wli3 We cannot control if the users change these values. CLI figuring out the path on its own would allow you the most control. Why do you say it won't help? |
This is on hold right now, due to design changes. |
@nkolev92 shouldn't be required now. right? Are we still deliberating on the location of the extracted tools package payload? |
Redundant now. |
I am confused. @anangaur you were the asking for tools to be placed next to the user's NuGet package cache, because it allowed you in the future to maybe move this functionality into nuget.exe. Is this something that you guys are no longer interested at and now we will keep tools under the .dotnet folder? Also, if this will be under a NuGet folder, we will not hand craft that location, which is why @wli3 asked for an API. I thought we were in agreement on this with @rrelyea. I am sorry if I am missing something here, I guess I don't have the whole story. |
I don't think we want the tools functionality in NuGet.exe anymore. There's also the issue that even our machine-wide config can still be changed, so this tools location could not be enforced permanently. I'd still wait on @anangaur and @rrelyea to confirm that we're on the same page. |
Just to clarify, we may want this functionality in NuGet in future but we will use the same .dotnet folder that we all decided on. I think we all (including @livarcocc)are on the same page on this now :) |
Tools CLI ask
Need to be in user directory
Or at least an option to say “only user directory”. Current all global tool is user level, since we don’t want to require user to run with sudo. While today’s NuGet cache could be user level or machine level.
All the “format”
This is due to weird behavior when using profile.d and paths.d adding to PATH. For mac, if we want to add user directory using paths.d. It has to be in ~/.nuget/ toolsdir format (before tilde expansion). And for Linux using profile.d, it has to be $HOME/.nuget/toolsplace format. The full path will also be used to display message to user. To make such API look nice turned out is hard.
The text was updated successfully, but these errors were encountered: