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

update the macOS up to date query, get actionable output #360

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

atomic111
Copy link
Member

@atomic111 atomic111 commented Mar 1, 2024

the new mql provides you a better output which update is missing:

cnspec> parse.plist('/Library/Preferences/com.apple.SoftwareUpdate.plist').params['RecommendedUpdates'] == empty
[failed] parse.plist.params.RecommendedUpdates == <ref>
  expected: == _
  actual:   [
    0: {
      Display Name: "macOS Sonoma 14.3.1"
      Display Version: "14.3.1"
      Identifier: "MSU_UPDATE_23D60_patch_14.3.1_minor"
      MobileSoftwareUpdate: true
      Product Key: "MSU_UPDATE_23D60_patch_14.3.1_minor"
    }
  ]

Instead of this output:

cnspec> command("softwareupdate -l").stderr.contains("No new software available.")
[failed] command.stderr.contains
  expected: == true
  actual:   false

Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
Copy link
Contributor

@mm-weber mm-weber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mm-weber mm-weber merged commit 2f09324 into main Mar 1, 2024
7 checks passed
@mm-weber mm-weber deleted the patrick/update-macOS-update-check branch March 1, 2024 12:45
@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants