Skip to content

Support environment variable expansion in --location paths #6404

Closed as not planned

Description

Maintainer test — verifying the new agentic Duplicate Surfacing workflow (tracking: #6399). This issue intentionally duplicates an existing request and will be closed shortly after the run completes.

Relevant area(s)

WinGet CLI

Description of the new feature / enhancement

It would be great if the --location argument supported environment variable expansion natively, without relying on the shell. For example, I keep a set of per-app install-location overrides in a frontend and want them to be portable across machines, where the same path resolves differently (different drive letters, user profiles, etc.).

Having winget expand environment variables in --location itself — independent of the calling shell or app — would make those overrides portable.

Proposed technical implementation details

Since / : * ? " < > | are illegal in folder names, a delimiter like <VAR> could denote an environment variable, e.g. --location "<SystemDrive>\Program Files\my-app" would expand <SystemDrive> to C:.

Activity

  1. added
    Possible-DuplicateAutomatically surfaced as a likely duplicate of an existing issue; awaiting maintainer confirmation.
    on Jul 29, 2026
  2. github-actions commented on Jul 29, 2026

    @github-actions

    Possible duplicates (surfaced automatically for maintainer review — this issue has not been closed):

    Maintainers: if one of these is the canonical issue, comment Duplicate of #<number> to consolidate. Earlier/curated issues are preferred as canonical.

    Template: msftbot/duplicate/surfaced

    Generated by 🔁 Duplicate Surfacing for #6404 · sonnet46 · 18.7 AIC · ⌖ 7.91 AIC · ⊞ 5.7K · ◷

  3. removed
    Needs-TriageIssue needs to be triaged
    Possible-DuplicateAutomatically surfaced as a likely duplicate of an existing issue; awaiting maintainer confirmation.
    on Jul 29, 2026
  4. denelon commented on Jul 29, 2026

    @denelon
    CollaboratorAuthor

    Closing — this was a maintainer verification of the new Duplicate Surfacing workflow (#6399). It correctly surfaced #6388. No further action needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions