microsoft / winget-create

The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
MIT License
489 stars 84 forks source link

Issue updating mixed WIX/portable package #389

Closed davidkna closed 1 year ago

davidkna commented 1 year ago

Brief description of your issue

wingetcreate fails to update a manifest made of two WIX installers (for x64 and x86) and one portable zip package (for arm64).

The issue might be related to #382, but it throws a different error.

Steps to reproduce

Run wingetcreate.exe update Starship.Starship -v 1.15.0 -u https://github.com/starship/starship/releases/download/v1.15.0/starship-x86_64-pc-windows-msvc.msi https://github.com/starship/starship/releases/download/v1.15.0/starship-i686-pc-windows-msvc.msi https://github.com/starship/starship/releases/download/v1.15.0/starship-aarch64-pc-windows-msvc.zip

Expected behavior

wingetcreate updates the manifest

Actual behavior

wingetcreate throws an error:

Abrufen des letzten Manifests für Starship.Starship
Herunterladen und analysieren: https://github.com/starship/starship/releases/download/v1.15.0/starship-x86_64-pc-windows-msvc.msi...
Herunterladen und analysieren: https://github.com/starship/starship/releases/download/v1.15.0/starship-i686-pc-windows-msvc.msi...
Herunterladen und analysieren: https://github.com/starship/starship/releases/download/v1.15.0/starship-aarch64-pc-windows-msvc.zip...
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.<>c.<UpdateManifestsAutonomously>b__39_4(Installer i)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.DistinctIterator`1.ToList()
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.UpdateManifestsAutonomously(Manifests manifests)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.ExecuteManifestUpdate(List`1 latestManifestContent, CommandExecutedEvent commandEvent)
   at Microsoft.WingetCreateCLI.Commands.UpdateCommand.Execute()
   at Microsoft.WingetCreateCLI.Program.Main(String[] args)

Environment

Windows Package Manager v1.4.11071
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.1848
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.11071.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

WingetCreateCLI 1.2.6.0