Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Chocolatey Provider should return only one entry to Oneget's Install-Package #6

Description

@JohnLudlow

I tried to install VirtualBox using the Windows 10 PackageManagement Install-Package cmdlet, but got this error:

PS C:\WINDOWS\system32> install-package virtualbox
WARNING: 'virtualbox' matched package 'virtualbox/5.0.14.105127' from provider: 'Chocolatey', source 'chocolatey'
WARNING: 'virtualbox' matched package 'VirtualBox.ExtensionPack/5.0.14.105127' from provider: 'Chocolatey', source
'chocolatey'
install-package : Unable to install, multiple packages matched 'virtualbox'. Please specify an exact -Name and
-RequiredVersion.
At line:1 char:1
+ install-package virtualbox
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], E
   xception
    + FullyQualifiedErrorId : DisambiguateForInstall,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage


PS C:\WINDOWS\system32>

Clearly, I want to install VirtualBox. I got around this by using Find-Package and piping into Install-Package, but this shouldn't really be necessary. I noticed similar issues with npm and 7zip.

I raised an issue on Oneget:OneGet/oneget#169. The folks over there feel that Chocolatey is returning multiple results in this situation when it should return one - most likely, the package that matched the name exactly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions