Skip to content

Commit

Permalink
(maint) Improve log message
Browse files Browse the repository at this point in the history
The log message when trying to downgrade a program
shows a variety of switches, --force, --allow-downgrade
One of these is formatted as prose, side by side
Changed to reflect proper switch syntax.
  • Loading branch information
Mauville authored and gep13 committed Apr 16, 2021
1 parent d74c45f commit 95eae5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chocolatey/infrastructure.app/services/NugetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ public virtual ConcurrentDictionary<string, PackageResult> install_run(Chocolate

if (installedPackage != null && version != null && version < installedPackage.Version && !config.AllowMultipleVersions && !config.AllowDowngrade)
{
string logMessage = "A newer version of {0} (v{1}) is already installed.{2} Use --allow-downgrade or --force to attempt to install older versions, or use side by side to allow multiple versions.".format_with(installedPackage.Id, installedPackage.Version, Environment.NewLine);
string logMessage = "A newer version of {0} (v{1}) is already installed.{2} Use --allow-downgrade or --force to attempt to install older versions, or use --side-by-side to allow multiple versions.".format_with(installedPackage.Id, installedPackage.Version, Environment.NewLine);
var nullResult = packageInstalls.GetOrAdd(packageName, new PackageResult(installedPackage, _fileSystem.combine_paths(ApplicationParameters.PackagesLocation, installedPackage.Id)));
nullResult.Messages.Add(new ResultMessage(ResultType.Error, logMessage));
this.Log().Error(ChocolateyLoggers.Important, logMessage);
Expand Down Expand Up @@ -1637,4 +1637,4 @@ private void set_package_names_if_all_is_specified(ChocolateyConfiguration confi
}
}
}
}
}

0 comments on commit 95eae5a

Please sign in to comment.