-
-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2671 from marticliment/get-package-install-location
Open package install location
- Loading branch information
Showing
20 changed files
with
248 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/UniGetUI.PackageEngine.Managers.Dotnet/Providers/DotNetDetailsProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.Diagnostics; | ||
using UniGetUI.PackageEngine.Enums; | ||
using UniGetUI.PackageEngine.Interfaces; | ||
using UniGetUI.PackageEngine.ManagerClasses.Classes; | ||
using UniGetUI.PackageEngine.Managers.PowerShellManager; | ||
|
||
namespace UniGetUI.PackageEngine.Managers.Chocolatey | ||
{ | ||
public class DotNetDetailsProvider : BaseNuGetDetailsProvider | ||
{ | ||
public DotNetDetailsProvider(BaseNuGet manager) : base(manager) | ||
{ } | ||
|
||
protected override string? GetPackageInstallLocation_Unsafe(IPackage package) | ||
{ | ||
return Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".dotnet", "tools"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/UniGetUI.PackageEngine.Managers.PowerShell/Providers/PowerShellDetailsProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Diagnostics; | ||
using Windows.ApplicationModel.Core; | ||
using UniGetUI.PackageEngine.Enums; | ||
using UniGetUI.PackageEngine.Interfaces; | ||
using UniGetUI.PackageEngine.ManagerClasses.Classes; | ||
using UniGetUI.PackageEngine.Managers.PowerShellManager; | ||
|
||
namespace UniGetUI.PackageEngine.Managers.Chocolatey | ||
{ | ||
public class PowerShellDetailsProvider : BaseNuGetDetailsProvider | ||
{ | ||
public PowerShellDetailsProvider(BaseNuGet manager) : base(manager) | ||
{ } | ||
|
||
protected override string? GetPackageInstallLocation_Unsafe(IPackage package) | ||
{ | ||
var user_path = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), | ||
"WindowsPowerShell", "Modules", package.Id); | ||
if (Directory.Exists(user_path)) return user_path; | ||
|
||
var system_path = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), | ||
"WindowsPowerShell", "Modules", package.Id); | ||
if (Directory.Exists(system_path)) return system_path; | ||
|
||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/UniGetUI.PackageEngine.Managers.PowerShell7/Providers/PowerShell7DetailsProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Diagnostics; | ||
using UniGetUI.PackageEngine.Enums; | ||
using UniGetUI.PackageEngine.Interfaces; | ||
using UniGetUI.PackageEngine.ManagerClasses.Classes; | ||
using UniGetUI.PackageEngine.Managers.PowerShellManager; | ||
|
||
namespace UniGetUI.PackageEngine.Managers.Chocolatey | ||
{ | ||
public class PowerShell7DetailsProvider : BaseNuGetDetailsProvider | ||
{ | ||
public PowerShell7DetailsProvider(BaseNuGet manager) : base(manager) | ||
{ | ||
} | ||
|
||
protected override string? GetPackageInstallLocation_Unsafe(IPackage package) | ||
{ | ||
var user_path = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), | ||
"PowerShell", "Modules", package.Id); | ||
if (Directory.Exists(user_path)) return user_path; | ||
|
||
var system_path = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), | ||
"PowerShell", "Modules", package.Id); | ||
if (Directory.Exists(system_path)) return system_path; | ||
|
||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.