diff --git a/Source/ChocolateyGui.Common.Windows/Services/PackageArgumentsService.cs b/Source/ChocolateyGui.Common.Windows/Services/PackageArgumentsService.cs index b73cb59d9..89c5309e8 100644 --- a/Source/ChocolateyGui.Common.Windows/Services/PackageArgumentsService.cs +++ b/Source/ChocolateyGui.Common.Windows/Services/PackageArgumentsService.cs @@ -61,7 +61,7 @@ public IEnumerable DecryptPackageArgumentsFile(string id, string version if (string.IsNullOrEmpty(arguments)) { - _dialogService.ShowMessageAsync( + Logger.Debug( string.Empty, L(nameof(Resources.PackageView_UnableToFindArgumentsFile), version, id)); yield break; diff --git a/Source/ChocolateyGui.Common.Windows/ViewModels/Items/PackageViewModel.cs b/Source/ChocolateyGui.Common.Windows/ViewModels/Items/PackageViewModel.cs index cd6bbcd49..b86e24549 100644 --- a/Source/ChocolateyGui.Common.Windows/ViewModels/Items/PackageViewModel.cs +++ b/Source/ChocolateyGui.Common.Windows/ViewModels/Items/PackageViewModel.cs @@ -431,9 +431,18 @@ public async Task ShowArguments() { var decryptedArguments = _packageArgumentsService.DecryptPackageArgumentsFile(Id, Version.ToString()).ToList(); - await _dialogService.ShowMessageAsync( - L(nameof(Resources.PackageViewModel_ArgumentsForPackageFormat), Title), - string.Join(Environment.NewLine, decryptedArguments)); + if (decryptedArguments.Count == 0) + { + await _dialogService.ShowMessageAsync( + L(nameof(Resources.PackageViewModel_ArgumentsForPackageFormat), Title), + L(nameof(Resources.PackageViewModel_NoArgumentsAvailableForPackage))); + } + else + { + await _dialogService.ShowMessageAsync( + L(nameof(Resources.PackageViewModel_ArgumentsForPackageFormat), Title), + string.Join(Environment.NewLine, decryptedArguments)); + } } public async Task Install() diff --git a/Source/ChocolateyGui.Common/Properties/Resources.Designer.cs b/Source/ChocolateyGui.Common/Properties/Resources.Designer.cs index f73e77694..1779ecca5 100644 --- a/Source/ChocolateyGui.Common/Properties/Resources.Designer.cs +++ b/Source/ChocolateyGui.Common/Properties/Resources.Designer.cs @@ -2288,6 +2288,15 @@ public static string PackageViewModel_LoadingPackageInfo { } } + /// + /// Looks up a localized string similar to There are no Persisted Arguments available for this package!. + /// + public static string PackageViewModel_NoArgumentsAvailableForPackage { + get { + return ResourceManager.GetString("PackageViewModel_NoArgumentsAvailableForPackage", resourceCulture); + } + } + /// /// Looks up a localized string similar to Pinning package. /// diff --git a/Source/ChocolateyGui.Common/Properties/Resources.resx b/Source/ChocolateyGui.Common/Properties/Resources.resx index 17fbdc290..bc03acdea 100644 --- a/Source/ChocolateyGui.Common/Properties/Resources.resx +++ b/Source/ChocolateyGui.Common/Properties/Resources.resx @@ -1349,4 +1349,7 @@ Please contact your System Administrator to enable this operation. [REDACTED ARGUMENT] + + There are no Persisted Arguments available for this package! + \ No newline at end of file