Skip to content

Commit c1f41f2

Browse files
Add --locale en-US to all WinGet CLI invocations; use system WinGet in NativeWinGetHelper
Agent-Logs-Url: https://github.com/Devolutions/UniGetUI/sessions/d2502c52-fdbb-4cf9-96d2-8318358d2696 Co-authored-by: mamoreau-devolutions <242016029+mamoreau-devolutions@users.noreply.github.com>
1 parent bcb80f5 commit c1f41f2

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/UniGetUI.PackageEngine.Managers.WinGet/ClientHelpers/BundledWinGetHelper.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public IReadOnlyList<Package> GetAvailableUpdates_UnSafe()
3030
FileName = WinGet.BundledWinGetPath,
3131
Arguments =
3232
Manager.Status.ExecutableCallArgs
33-
+ " update --include-unknown --accept-source-agreements "
33+
+ " update --include-unknown --accept-source-agreements --locale en-US "
3434
+ WinGet.GetProxyArgument(),
3535
RedirectStandardOutput = true,
3636
RedirectStandardError = true,
@@ -165,7 +165,7 @@ public IReadOnlyList<Package> GetInstalledPackages_UnSafe()
165165
FileName = WinGet.BundledWinGetPath,
166166
Arguments =
167167
Manager.Status.ExecutableCallArgs
168-
+ " list --accept-source-agreements "
168+
+ " list --accept-source-agreements --locale en-US "
169169
+ WinGet.GetProxyArgument(),
170170
RedirectStandardOutput = true,
171171
RedirectStandardError = true,
@@ -299,7 +299,7 @@ public IReadOnlyList<Package> FindPackages_UnSafe(string query)
299299
Manager.Status.ExecutableCallArgs
300300
+ " search \""
301301
+ query
302-
+ "\" --accept-source-agreements "
302+
+ "\" --accept-source-agreements --locale en-US "
303303
+ WinGet.GetProxyArgument(),
304304
RedirectStandardOutput = true,
305305
RedirectStandardError = true,
@@ -719,7 +719,7 @@ public IReadOnlyList<string> GetInstallableVersions_Unsafe(IPackage package)
719719
Manager.Status.ExecutableCallArgs
720720
+ " show "
721721
+ WinGetPkgOperationHelper.GetIdNamePiece(package)
722-
+ $" --versions --accept-source-agreements "
722+
+ $" --versions --accept-source-agreements --locale en-US "
723723
+ " "
724724
+ WinGet.GetProxyArgument(),
725725
UseShellExecute = false,
@@ -781,7 +781,7 @@ public IReadOnlyList<IManagerSource> GetSources_UnSafe()
781781
{
782782
FileName = Manager.Status.ExecutablePath,
783783
Arguments =
784-
Manager.Status.ExecutableCallArgs + " source list " + WinGet.GetProxyArgument(),
784+
Manager.Status.ExecutableCallArgs + " source list --locale en-US " + WinGet.GetProxyArgument(),
785785
RedirectStandardOutput = true,
786786
RedirectStandardError = true,
787787
RedirectStandardInput = true,

src/UniGetUI.PackageEngine.Managers.WinGet/ClientHelpers/NativeWinGetHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,12 +647,12 @@ public void GetPackageDetails_UnSafe(IPackageDetails details)
647647
List<string> output = [];
648648
ProcessStartInfo startInfo = new()
649649
{
650-
FileName = WinGet.BundledWinGetPath,
650+
FileName = Manager.Status.ExecutablePath,
651651
Arguments =
652652
Manager.Status.ExecutableCallArgs
653653
+ " show "
654654
+ WinGetPkgOperationHelper.GetIdNamePiece(details.Package)
655-
+ " --disable-interactivity --accept-source-agreements --source "
655+
+ " --disable-interactivity --accept-source-agreements --locale en-US --source "
656656
+ details.Package.Source.Name,
657657
RedirectStandardOutput = true,
658658
RedirectStandardError = true,

0 commit comments

Comments
 (0)