diff --git a/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs b/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs index 3d3cadd..b6b55d9 100644 --- a/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs +++ b/src/NvGet.Tools.Shared/Arguments/ConsoleArgsContext.cs @@ -119,7 +119,7 @@ Action TryParseAndSet(Func parse, Action set) includeMaxVersion: true, floatRange: null, originalString: null)) : - (false, r.UpgradePolicy, VersionRange.Parse(r.UpdatedVersion))); + (false, r.UpgradePolicy, VersionRange.Parse(r.UpdatedVersion ?? "0.0.0.0"))); async Task> LoadFromStreamAsync() { diff --git a/src/NvGet/Tools/Updater/Extensions/UpdaterParametersExtension.cs b/src/NvGet/Tools/Updater/Extensions/UpdaterParametersExtension.cs index 2168318..b8d504d 100644 --- a/src/NvGet/Tools/Updater/Extensions/UpdaterParametersExtension.cs +++ b/src/NvGet/Tools/Updater/Extensions/UpdaterParametersExtension.cs @@ -133,11 +133,11 @@ UpgradePolicy upgradePolicy { return true; } - else if(upgradePolicy == UpgradePolicy.Minor) + else if (upgradePolicy == UpgradePolicy.Minor) { return version.Version < new Version(reference.Identity.Version.Major + 1, 0, 0); } - else if(upgradePolicy == UpgradePolicy.Patch) + else if (upgradePolicy == UpgradePolicy.Patch) { return version.Version < new Version(reference.Identity.Version.Major, reference.Identity.Version.Minor + 1, 0); }