microsoft / microsoft/winget-create

[Wingetcreate bug]: UpgradeCode gets clobbered if not under AppsAndFeaturesEntries

Open
#683 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Needs-Triage
Dominant language
C#
Stars
651
Forks
114
Avg merge
7h 52m
Merged PRs (30d)
3

Description

Description of the new feature/enhancement

From https://github.com/microsoft/winget-pkgs/pull/126734#issuecomment-1813142848: "It seems the latest version of wingetcreate removed the UpgradeCode field if it wasn't under AppsAndFeaturesEntries node."

Can this be modified so that an AppsAndFeaturesEntries node gets created and the UpgradeCode gets parented under it? Goal of basically turning the oprhaned UpgradeCode into an AppsAndFeaturesEntries node with the same UpgradeCode.

Proposed technical implementation details (optional)

(I'd need time to go look at the code.)

if ($variable.UpgradeCode) {
  $variable.AppsAndFeaturesEntries = @(UpgradeCode)
}

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 code that handles UpgradeCode and AppsAndFeaturesEntries in winget-create, then inspect how manifests are generated when UpgradeCode is not already nested. Confirm the completed behavior by checking that an orphaned UpgradeCode is retained under a created AppsAndFeaturesEntries node.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.