Repository navigation
Expose Platform API from SMA and uses that in NuGetProvider - #1282
Conversation
| @@ -50,6 +50,7 @@ public enum XDG_Type | |||
| PROFILE, | |||
There was a problem hiding this comment.
Add comment to each of these to specify what they are used for
There was a problem hiding this comment.
I think adding POWERSEHLL to XDG_Type enum does not seem to be cohesive. In your case, should default powershell path be enough?
There was a problem hiding this comment.
I would say returning xdgPowerShellDefault directory should be good enough for NuGet provider.
There was a problem hiding this comment.
That would leave us not implementing XDG BDS at all. (For this particular case.)
| string xdgcachehome = System.Environment.GetEnvironmentVariable("XDG_CACHE_HOME"); | ||
| string xdgConfigHomeDefault = Path.Combine ( System.Environment.GetEnvironmentVariable("HOME"), ".config", "powershell"); | ||
| string xdgModuleDefault = Path.Combine ( System.Environment.GetEnvironmentVariable("HOME"), ".local", "share", "powershell", "Modules"); | ||
| string xdgPowerShellDefault = Path.Combine( System.Environment.GetEnvironmentVariable("HOME"), ".local", "share", "powershell"); |
There was a problem hiding this comment.
I like this, but at this point, it should rightfully be called what it is: xdgDataHomeDefault.
|
src/Microsoft.PackageManagement.NuGetProvider/NugetLightRequest.cs, line 241 [r1] (raw file):
|
|
|
||
| case Platform.XDG_Type.MODULES: | ||
| //the user has set XDG_DATA_HOME corresponding to module path | ||
| if (String.IsNullOrEmpty(xdgdatahome)){ |
|
|
|
Thanks! |
|
Ah GitHub went down as I tried to add this: Thanks Quoc Truong (@quoctruong)! |
|
I can't seem to reply directly to this Quoc Truong (@quoctruong):
Cmdlets themselves won't be run as sudo, as they're not separate processes. But PowerShell may have been. If you need to check the process, I believe you check |
…ider Expose Platform API from SMA and uses that in NuGetProvider
Make the Platform class public.
Added PowerShell location to the XDG_Type enum.
Uses these locations in NuGetProvider
This change is