microsoft / microsoft/winget-cli

winget configuratoin validate succeeds without error despite resource not existing

Open
#4,509 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Configure Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

I was testing the winget configuration validation and intentionally supplied a bad resource name by adding a 'Z' at the end of name expected it to fail.

-    - resource: Microsoft.Windows.Developer/ShowSecondsInClock
+    - resource: Microsoft.Windows.Developer/ShowSecondsInClockZ

However, the CLI still output

Validation found no issues.

This makes me think there is something that implicitly skips unrecognized resources.

Steps to reproduce

See logs

Run validation command such as

winget configuration validate -f .\configurations\settings.dsc.yaml
Expected behavior

Winget should report that the resource Microsoft.Windows.Developer/ShowSecondsInClockZ does not exist and suggest likely names Microsoft.Windows.Developer/ShowSecondsInClock

Actual behavior

winget reports

Validation found no issues.
Environment
Winget: v1.7.11261
Windows: v10.0.022621.3593

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running winget configuration validate -f .\configurations\settings.dsc.yaml with the misspelled Microsoft.Windows.Developer/ShowSecondsInClockZ resource and review the linked validation logs. Trace the configuration validation entry point to see how unrecognized resources are handled; done means validation reports the missing resource and suggests Microsoft.Windows.Developer/ShowSecondsInClock.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.