Closed dgulik closed 6 months ago
@dgulik - Have you tried winget pin add
instead of winget add pin
? winget add
is an alias for winget install
PS D:\Git\winget-pkgs> winget install -?
Windows Package Manager v1.7.10582
Copyright (c) Microsoft Corporation. All rights reserved.
Installs the selected package, either found by searching a configured source or directly from a manifest. By default, the query must case-insensitively match the id, name, or moniker of the package. Other fields can be used by passing their appropriate option. By default, install command will check package installed status and try to perform an upgrade if applicable. Override with --force to perform a direct install.
usage: winget install [[-q] <query>...] [<options>]
The following command aliases are available:
add
https://learn.microsoft.com/en-us/windows/package-manager/winget/pinning#usage
PS D:\Git\winget-pkgs> winget pin -?
Windows Package Manager v1.7.10582
Copyright (c) Microsoft Corporation. All rights reserved.
Manage package pins with the sub-commands. A pin can limit the Windows Package Manager from upgrading a package to specific ranges of versions, or it can prevent it from upgrading the package altogether. A pinned package may still upgrade on its own and be upgraded from outside the Windows Package Manager.
usage: winget pin [<command>] [<options>]
The following sub-commands are available:
add Add a new pin
remove Remove a package pin
list List current pins
reset Reset pins
Oh well, my mistake. I was using the wrong command. winget pin add produces the correct result.
On Wed, Mar 6, 2024 at 9:06 PM Kaleb Luedtke @.***> wrote:
@dgulik https://github.com/dgulik - Have you tried winget pin add instead of winget add pin?
https://learn.microsoft.com/en-us/windows/package-manager/winget/pinning#usage
— Reply to this email directly, view it on GitHub https://github.com/microsoft/winget-cli/issues/4249#issuecomment-1982252634, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALU3DEKV2BDYDCMPI74MFJTYW7KSPAVCNFSM6AAAAABEKFU2HOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBSGI2TENRTGQ . You are receiving this because you were mentioned.Message ID: @.***>
Brief description of your issue
Unable to pin a package. The package was previously pinned. After having some other issues with winget, I reset it and then ran upgrade all and it started to upgrade a previously pinned package, and I closed the CLI while this upgrade was in progress. Now I am unable to pin this package. Please, refer to screenshot.
Steps to reproduce
winget add pin OBSProject.OBSStudio winget add pin WavesAudio.WavesCentral
both of these were previously pinned.
Expected behavior
packages to be pinned so I can run upgrade --all
Actual behavior
packages are not pinning due to error; "Trying to upgrade the installed package..."
Environment