Skip to content

Support for environment variable expansion in --location #6388

Description

@eugenesvk

Relevant area(s)

WinGet CLI

Description of the new feature / enhancement

I'm using a GUI (unigetui) as a frontend to winget-cli, and would like to save a batch of --location overrides it its app profiles. But I'd like those profiles to be portable across machines, so would like to be able to use environment variables in paths that would resolve to differnt paths on different machines
For that it would help if winget supported environment variable expansion in its interface that doesn't depend on external tools (shells/apps)

Proposed technical implementation details

Since / : * ? " < > | are illegal in folder names, maybe you could use <> to denote env vars?

--location "<SystemDrive>Program Files\my-app" would expand to C:\

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-FeatureThis is a feature request for the Windows Package Manager client.Needs-TriageIssue needs to be triaged

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions