Skip to content

Enhance import/export schema to include override values #1512

@MisinformedDNA

Description

@MisinformedDNA

Add a Override property to the schema for each package.

Beyond using the Import feature to specify what I want to install, I would like to specify how I want to install. For instance, when I install Git, I prefer to exclude shell integration. For VS, I probably want to specify certain workloads.

At it's simplest form, a user can simply edit the schema file to include their desired overrides. A more complex use case would be for winget to remember the arguments used during install so that it can export those values as well.

We may also want to add a command line option for winget input to ignore the overrides.

Proposed technical implementation details (optional)

Desired schema:

"Packages": {
  "items": {
    "properties": {
      "PackageIdentifier": { },
      "Version": { },
      "Channel": { },
      "Scope": { },
      "Override": {
        "description": "Arguments passed through to --override",
        "type": "string"
      },
    }
  }
}

Desired example

{
  "Sources": 
  [
    {
      "Packages": 
      [
        {
          "PackageIdentifier": "Microsoft.VisualStudio.2019.Enterprise",
          "Override": "--add Microsoft.VisualStudio.Workload.Universal"
        },
        {
          "PackageIdentifier": "Git.Git",
          "Override": "/NoShellIntegration /NoGitLfs"
        },
      ],
    }
  ],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureThis is a feature request for the Windows Package Manager client.

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions