microsoft / microsoft/winget-cli
CatalogError, System.Exception with certain combinations of options
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
When running "Export-WinGetPackage" with specifying the InstallerType parameter, and if the package has a dependency, and that dependency package has a different InstallerType. The result is an error and not downloading the file(s). When the InstallerType is not specified (or set to default) the software is being downloaded normally. Also when specifying the "SkipDependencies" parameter, the software is downloaded.
Steps to reproduce
Powershell 5.1
<#
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.26100.4652
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.4652
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
#>
Export-WinGetPackage -Id Posit.RStudio -Architecture x64 -InstallerType Nullsoft
Id Name Source Status ExtendedErrorCode CorrelationData
-- ---- ------ ------ ----------------- ---------------
Posit.RStudio RStudio winget CatalogError System.Exception: Exception from HRESULT: 0x8A150104
Powershell 7.5.2
<#
$PSVersionTable
Name Value
---- -----
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
#>
Export-WinGetPackage -Id Posit.RStudio -Architecture x64 -InstallerType Nullsoft
Id Name Source Status ExtendedErrorCode CorrelationData
-- ---- ------ ------ ----------------- ---------------
Posit.RStudio RStudio winget CatalogError System.Runtime.InteropServices.COMException (0x8A150104)
In this example Package "Posit.RStudio" is a nullsoft package and the Dependency package "RProject.R" is a inno package.
Expected behavior
Instead of an error, download at least the specified file (if possible) and maybe return a clearer error message?
Actual behavior
Returning an error and not downloading anything
Environment
`
winget --info
Windows Package Manager v1.11.430
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.4652
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.26.430.0
`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with Export-WinGetPackage for Posit.RStudio using -InstallerType Nullsoft, then examine how its RProject.R dependency with a different installer type is handled. Done means the specified package is downloaded despite the dependency mismatch, or the command returns a clearer error describing the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100