Add a CheckWinget manifest Action (#12) - #14
Merged
Merged
Conversation
CheckPath needs an install path, which moves between versions and between machines - a per-user MSIX lands somewhere quite different from a per-machine MSI. For anything that arrived through App Installer the package id is the stable thing to check, so a sixth Action asks winget about it. Verify only. It never installs, never upgrades, never calls winget install: the check is `winget list --id <Target> --exact`, with --accept-source-agreements and --disable-interactivity because a winget that has never run otherwise blocks on a source-agreement prompt and nothing in a one-shot run with nobody watching may stop for input. Without --exact a bare name matches several packages and the check means nothing. Absence flows through Test-WcdTargetPresent like every other Action, so Optional keeps meaning exactly what it means elsewhere: a note when absent, a warning when the entry is required. Exit code 0 is installed and the "no applications found" code is absent; any other code means winget itself failed, which is an error naming the command to run by hand rather than a package quietly reported as missing. winget is absent from LTSC and stripped images, so it is probed once before the loop. Missing, that is one WARNING naming the real cause, and every CheckWinget entry becomes a Manual Step - one honest cause and N actionable rows, instead of N identical failures all pointing back at the same thing. Not Not Applicable: these are packages that genuinely should have been verified. Carrying that needs a MANUAL Result severity, which the checklist renders as a Manual Step. Manifest, README and manual document the Action and the winget-missing behaviour, and the manifest carries a commented-out example. PDF rebuilt with typst 0.15.1, the version CI pins. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmnKA5z4astW8XswYipd7j
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12.
A sixth Application Target Action, verify-only:
winget list --id <Target> --exact --accept-source-agreements --disable-interactivity. It never installs or upgrades anything. The package id is the stable thing to check for anything that arrived through App Installer, where an install path moves between versions and machines.Test-WcdTargetPresent, soOptionalbehaves exactly as it does for every other Action: note when absent, warning when required.CheckWingetentry becomes a Manual Step. Carrying that needed aMANUALResult severity, which the checklist renders as a Manual Step.WinContextDeploy.psd1(with a commented-out example), the README Action table and the manual; PDF rebuilt with typst 0.15.1.tests/Config-Applications.Tests.ps1covers installed, not installed,Optionalabsent, winget absent, a non-zero exit that is not "not found", and the exit-code mapping itself.Pester 5.7.1: 13/13 in this file, and PSScriptAnalyzer is clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TmnKA5z4astW8XswYipd7j