Closed Michaelzhouisnotwhite closed 1 year ago
portablePackageUserRoot
and portablePackageMachineRoot
only works for portable executable files.
Fndroid.ClashForWindows
uses full-fledged installers based on NSIS (nullsoft) so this won't work. See https://github.com/microsoft/winget-pkgs/blob/master/manifests/f/Fndroid/ClashForWindows/0.19.29/Fndroid.ClashForWindows.installer.yaml#L15-L51
There's also defaultInstallRoot
but taking a look at https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#default-install-root it's only for packages that requires it.
It's so weird. I hope the installation will installed on the protableuserRoot based on my settings by specifying --scope user
argument, that I don't have to use --location
every single time. This is not very logical
Brief description of your issue
I set
"portablePackageUserRoot": "%LOCALAPPDATA%/WingetPackages"
. Then I use command :winget install --id Fndroid.ClashForWindows --scope user --source winget
. The protablePagageUserRoot settings didn't affect. It still installed under%LOCALAPPDATA%/Programs
. I must specify --location everytime when I install packages.The
protablePackageMachineRoot
didn't work as well. What did I miss?Steps to reproduce
winget settings
set
"portablePackageUserRoot": "%LOCALAPPDATA%/WingetPackages"
winget install --id Fndroid.ClashForWindows --scope user --source winget
Expected behavior
The program will install under
"%LOCALAPPDATA%/WingetPackages"
Actual behavior
The program install under "%LOCALAPPDATA%\Programs"
Environment