-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Root directory of portable packages is always added to the PATH regardless of RelativeFilePath
#2909
Comments
RelativeFilePath
RelativeFilePath
I can confirm this. So this basically effects all users who are not developing winget? (Best real life issue for "Works on On a side note: So maybe thats a straightforward way to solve it, just add the installed dir to |
That is precisely the case. You might not want other executables to be added to the PATH. But it is an option. |
Maybe adding a filter/selector for files being copied to this directory could solve it? This way only files needed for the program will be copied to the Winget Package Directory. |
This same issue is happening with |
This has been fixed in WinGet v1.5.1081-preview release through PR #3002 cc @denelon |
It would have been great if the fix was backported in https://github.com/microsoft/winget-cli/releases/tag/v1.4.11071 |
@sitiom we don't take servicing updates lightly. We limit those to the minimum changes necessary since GA (Generally Available) releases have such a large blast radius. We're expecting a 1.5 release candidate build very soon™️. I'd like to release 1.5 at the end of the month. |
Brief description of your issue
In a machine without developer mode and in a non-admin shell, Portable packages with subdirectories under
RelativeFilePath
are not properly added to PATH. This is because the root directory of the package is always added to the PATH regardless.Steps to reproduce
RelativeFilePath
contains subdirectories. Let us install ffmpeg for this example:winget install ffmpeg
%localappdata%\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\
) instead of the actual file path (%localappdata%\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-5.1.2-full_build\bin
)Expected behavior
The root directory should not be added to the path but directories relative to the
RelativeFilePath
(%localappdata%\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-5.1.2-full_build\bin
).Actual behavior
The root directory of the package is always added to the PATH regardless of the
RelativeFilePath
(%localappdata%\Microsoft\WinGet\Packages\Gyan.FFmpeg_Microsoft.Winget.Source_8wekyb3d8bbwe\
) .Environment
Another question, how are command aliases handled in non-developer mode? What if there are multiple executables in one directory, and you only want to add one of them to the path?
The text was updated successfully, but these errors were encountered: