microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.68k stars 1.4k forks source link

Portable application executable is renamed despite absence of rename argument #4006

Open marco-eckstein opened 7 months ago

marco-eckstein commented 7 months ago

Brief description of your issue

The Portable/Standalone applications documentation states:

If a command value is specified in the manifest, then the symlink filename will be renamed to match the command value. If the rename argument is provided, then both the symlink filename and the portable exe filename will be renamed to match the rename argument value.

However, the portable exe is renamed even if the rename argument is absent.

In case the behavior is intended and only the documentation is misleading, I still request changing this behavior. Renaming the exe is confusing and seems unnecessary.

Steps to reproduce

Run winget install --exact --id Microsoft.Sysinternals.ProcessExplorer --version 17.05

Note that the manifest includes:

Commands:
- process-explorer

Expected behavior

C:\Users\<username>\AppData\Local\Microsoft\WinGet\Links contains symlink process-explorer.exe.

C:\Users\<username>\AppData\Local\Microsoft\WinGet\Packages\Microsoft.Sysinternals.ProcessExplorer_Microsoft.Winget.Source_8wekyb3d8bbwe\ contains procexp64.exe.

Actual behavior

C:\Users\<username>\AppData\Local\Microsoft\WinGet\Links contains symlink process-explorer.exe.

C:\Users\<username>\AppData\Local\Microsoft\WinGet\Packages\Microsoft.Sysinternals.ProcessExplorer_Microsoft.Winget.Source_8wekyb3d8bbwe\ contains process-explorer.exe.

Environment

Windows-Paket-Manager v1.6.3482
Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.

Windows: Windows.Desktop v10.0.19045.3803
Systemarchitektur: X64
Paket: Microsoft.DesktopAppInstaller v1.21.3482.0
Trenly commented 7 months ago