microsoft / microsoft/winget-cli

Allow replacing RelativeFilePath prefix for portable packages

Open
#6,382 1 comment 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 wanted to have a portable app installed to a single constant location to avoid some issues with variable paths, e.g., with firewall rules breaking due to path changes, requiring user intervention.

But if a manifest has defined RelativeFilePath like so, I can't do that

NestedInstallerFiles:
- RelativeFilePath: PatchCleanerPortable_1_4_2_0\PatchCleaner\PatchCleaner.exe

I'd like to be able to add a way to replace the variable prefix

Proposed technical implementation details

Add a flag that accepts a regex replacement rule to be applied to the RelativeFilePath --replace-relative-path 'regex_rule' so users could replace the variable prefix, e.g.,

--replace-relative-path '^PatchCleanerPortable.*\\' would result in the installation to a fixed PatchCleaner folder, removing the PatchCleanerPortable_1_4_2_0\ (would be nice if winget could cleanup \ itself if the user forgets)

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 tracing WinGet CLI option handling and the installation flow that consumes manifest RelativeFilePath values. Determine how a replacement rule should interact with nested installer paths, separators, and fixed destinations. Done means the proposed option consistently produces the requested portable installation layout and has coverage for the example path transformation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.