-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update windows-update.ps1 #145
Conversation
adding try-catch for LastDeploymentChangeTime with default to todays date.
This shoud hopefully fix Issue #144 |
The stack trace from #144 points to https://github.com/rgl/packer-plugin-windows-update/blob/v0.16.0/update/windows-update.ps1#L190 but why is that Using the current date does not seem appropriate, as it varies. Using a static 1970-01-01 would be more appropriate to signal that something is odd with the date. Or even, make it |
I hadn't looked through the rest of your script to see where it is used. So
didn't want to pass through as $null and potentially hit other $null value
exceptions. Linux Epoch time works. Unless you're filtering to only recent
patches to avoid showing Ancient stuff.
…On Wed, Jul 10, 2024, 5:46 PM Rui Lopes ***@***.***> wrote:
The stack trace from #144
<#144> points
to
https://github.com/rgl/packer-plugin-windows-update/blob/v0.16.0/update/windows-update.ps1#L190
but why is that LastDeploymentChangeTime $null at all?
Using the current date does not seem appropriate, as it varies. Using a
static 1970-01-01 would be more appropriate to signal that something is odd
with the date. Or even, make it $null or unknown.
—
Reply to this email directly, view it on GitHub
<#145 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIR566EFVYUWONKLXL4JVTDZLTUXNAVCNFSM6AAAAABKUDYKS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJZHA2DSOJXGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
To me it looks like the LastDeploymentChangeTime is only accessed to generate the update summary output. So moving on with the NULL value is maybe no dealbreaker (its just the output that looks a little bit strange). Especially for those folks (including me) who love and rely on this plugin as part of their image factory. |
Do we know if $update could be null at that point as well? Doesn't seem like the likely culprit, but the stack trace doesn't give an indication on which piece is null. |
looking at the error in #144 (comment), it seems to infer that KB5007651 has some kind of problem. by any change have you guys tried to install that KB5007651 manually (e.g. from the windows update app)? did it work? |
this was superseed with 27a4abb. please try https://github.com/rgl/packer-plugin-windows-update/releases/tag/v0.16.1 |
adding try-catch for LastDeploymentChangeTime with default to todays date.