microsoft / microsoft/winget-cli

Support for environment variable expansion in --location

Open
#6,388 2 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

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

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 in the WinGet CLI handling for the --location option and review how path arguments are currently parsed. Establish the accepted environment-variable syntax and expansion behavior, then verify portable paths across machines with CLI 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
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.