microsoft / microsoft/winget-cli
DSCv3 user settings file enhancements
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Comment 1:
I would definitely suggest having the UserSettings code handle the reading/writing of settings file itself. This code doesn't consider the settings backup file; which might be relevant to consider.
The question RE: the backup file becomes, "What are we managing with this resource?". Is it the contents of the primary settings file or is it the logical settings that WinGet will use when run?
Should we refuse to operate if the operation requires reading JSON from the settings file and that file is corrupt?
Comment 2:
Not having a settings file is a legitimate state (in fact, the most likely state on a new system).
Add a test(s) that ensures proper handling when the settings file does not exist.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the UserSettings code and its settings-file tests. Clarify how the primary and backup files should be managed, how corrupt JSON should be handled, and ensure the no-settings-file state is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100