Skip to content

Add a CheckWinget manifest Action (#12) - #14

Merged
DireDoch merged 1 commit into
mainfrom
feature/check-winget-action
Sep 1, 2026
Merged

DireDoch merged 1 commit into
mainfrom
feature/check-winget-action

Conversation

@DireDoch

@DireDoch DireDoch commented Sep 1, 2026

Copy link
Copy Markdown
Owner

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.

  • Absence goes through Test-WcdTargetPresent, so Optional behaves exactly as it does for every other Action: note when absent, warning when required.
  • Exit 0 = installed; the "no applications found" code = absent; any other code = winget itself failed, reported as an error naming the command to run by hand rather than as a missing package.
  • winget missing (LTSC, stripped images) is probed once before the loop: one WARNING row for the real cause, and every CheckWinget entry becomes a Manual Step. Carrying that needed a MANUAL Result severity, which the checklist renders as a Manual Step.
  • Documented in 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.ps1 covers installed, not installed, Optional absent, 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

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
@DireDoch
DireDoch merged commit 967fa94 into main Sep 1, 2026
3 checks passed
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.

Add a CheckWinget manifest Action

1 participant