Skip to content
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

Fix bug where softwareupdate could download the wrong update #497

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

manicmachine
Copy link
Contributor

SoftwareUpdate.Download() has a bug in which it could download the wrong update when expecting requireMinimumOSVersion. Currently it iterates over each line returned by List() and, if it contains "Label:", assigns it to updateLabel. However, there's no check that that label is for the os update. If the os update is present in softwareupdateList, but isn't the last label returned, softwareupdate would then download whatever the last update listed is.

A quick check that the label contains the requiredMinimumOSVersion resolves this.

…ted update, resulting in softwareupdate possibly downloading the wrong update
@erikng erikng changed the base branch from main to development June 2, 2023 19:44
@erikng erikng merged commit c7525a2 into macadmins:development Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants