You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The module will now check daily with PowerShellGallery to see if there
is a newer version of the module available. This check can be disabled
with the new `DisableUpdateCheck` config property.
The check happens asynchronously. The web request is kicked off when
the module is loaded, but the result is only checked when the user
runs a command.
The result is logged at the Verbose level in any failure case as well
as when the module is up-to-date. When there is a newer version
available, it will write the message out as a Warning. The web request
will only run once per day, and the user message will only be written
once per day as well.
Write-Log"A newer version of $moduleName is available ($latestVersion). Your current version is $moduleVersion. Run 'Update-Module $moduleName' to get up-to-date."-Level Warning
89
+
}
90
+
}
91
+
catch
92
+
{
93
+
# This could happen if the server returned back an invalid (non-XML) response for the request
94
+
# for some reason.
95
+
Write-Log-Message "[$moduleName] update check failed for today (invalid XML response). Assuming up-to-date."-Level Verbose
96
+
$script:HasLatestVersion=$true
97
+
}
98
+
99
+
return
100
+
}
101
+
else
102
+
{
103
+
# It's still running. Nothing further for us to do right now. We'll check back
104
+
# again next time.
105
+
return
106
+
}
107
+
}
108
+
else
109
+
{
110
+
# We either haven't checked yet, or it's a new day so we should check again.
0 commit comments