Skip to content

Commit

Permalink
UpdateCheck must handle when module is newer than published version (#…
Browse files Browse the repository at this point in the history
…204)

Publishing a new version to PowerShellGallery happens a few hours after
the version is updated in GitHub.  This edge-case meant that someone
in this state would have been told that the older published version was
newer than the version that they were currently using.
  • Loading branch information
HowardWolosky committed May 31, 2020
1 parent ed9b114 commit efdcbfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion UpdateCheck.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ function Invoke-UpdateCheck
$script:HasLatestVersion = $latestVersion -eq $moduleVersion
if ($script:HasLatestVersion)
{
Write-Log "[$moduleName] update check complete. Running latest version: $($latestVersion.ToString())" -Level Verbose
Write-Log "[$moduleName] update check complete. Running latest version: $latestVersion" -Level Verbose
}
elseif ($moduleVersion -gt $latestVersion)
{
Write-Log "[$moduleName] update check complete. This version ($moduleVersion) is newer than the latest published version ($latestVersion)." -Level Verbose
}
else
{
Expand Down

0 comments on commit efdcbfa

Please sign in to comment.