microsoft / microsoft/winget-cli

DSCv3 user settings file enhancements

Open
#5,425 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Feature
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.