Skip to content

Commit

Permalink
Fix updating for dependencies that were explicitly installed
Browse files Browse the repository at this point in the history
  • Loading branch information
igor84 committed Sep 9, 2024
1 parent a011c51 commit 36e381d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/NuGetForUnity/Editor/NugetPackageInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ private static bool Install([NotNull] INugetPackage package, bool refreshAssets,
if (InstalledPackagesManager.TryGetById(package.Id, out var installedPackage))
{
var comparisonResult = installedPackage.CompareTo(package);

if (comparisonResult != 0 && installedPackage.IsManuallyInstalled)
{
NugetLogger.LogVerbose(
"{0} {1} is installed explicitly so it will not be replaced with {3}",
installedPackage.Id,
installedPackage.Version,
package.Version,
package.Version);
return true;
}

if (comparisonResult < 0)
{
NugetLogger.LogVerbose(
Expand Down

0 comments on commit 36e381d

Please sign in to comment.