Skip to content

Commit efdcbfa

Browse files
UpdateCheck must handle when module is newer than published version (#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.
1 parent ed9b114 commit efdcbfa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

UpdateCheck.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ function Invoke-UpdateCheck
8181
$script:HasLatestVersion = $latestVersion -eq $moduleVersion
8282
if ($script:HasLatestVersion)
8383
{
84-
Write-Log "[$moduleName] update check complete. Running latest version: $($latestVersion.ToString())" -Level Verbose
84+
Write-Log "[$moduleName] update check complete. Running latest version: $latestVersion" -Level Verbose
85+
}
86+
elseif ($moduleVersion -gt $latestVersion)
87+
{
88+
Write-Log "[$moduleName] update check complete. This version ($moduleVersion) is newer than the latest published version ($latestVersion)." -Level Verbose
8589
}
8690
else
8791
{

0 commit comments

Comments
 (0)