Skip to content

Allow replacing RelativeFilePath prefix for portable packages #6382

Description

@eugenesvk

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 dues 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)

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