Crash when attempting to submit a manifest
Ubujira opened this issue · 1 comments
Brief description of your issue
WingetCreate crashes when attempting to submit a manifest with the submit or update subcommand with a NullReferenceException.
Submit subcommand crash
System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.WingetCreateCLI.Commands.BaseCommand.GitHubSubmitManifests(Manifests manifests, String prTitle, Boolean shouldReplace, String replaceVersion) at Microsoft.WingetCreateCLI.Commands.UpdateCommand.ExecuteManifestUpdate(List
1 latestManifestContent, CommandExecutedEvent commandEvent)
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.Execute()
at Microsoft.WingetCreateCLI.Program.Main(String[] args)`
Update subcommand crash
System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.WingetCreateCLI.Commands.BaseCommand.GitHubSubmitManifests(Manifests manifests, String prTitle, Boolean shouldReplace, String replaceVersion) at Microsoft.WingetCreateCLI.Commands.UpdateCommand.ExecuteManifestUpdate(List
1 latestManifestContent, CommandExecutedEvent commandEvent)
at Microsoft.WingetCreateCLI.Commands.UpdateCommand.Execute()
at Microsoft.WingetCreateCLI.Program.Main(String[] args)`
Steps to reproduce
Using the update subcommand: wingetcreate.exe update mcmilk.7zip-zstd -u https://github.com/mcmilk/7-Zip-zstd/releases/download/v22.01-v1.5.5-R3/7z22.01-zstd-x64.exe https://github.com/mcmilk/7-Zip-zstd/releases/download/v22.01-v1.5.5-R3/7z22.01-zstd-x32.exe https://github.com/mcmilk/7-Zip-zstd/releases/download/v22.01-v1.5.5-R3/7z22.01-zstd-arm64.exe https://github.com/mcmilk/7-Zip-zstd/releases/download/v22.01-v1.5.5-R3/7z22.01-zstd-arm.exe -v "22.01 ZS v1.5.5 R3" --submit
Using the manifest files with the submit command: wingetcreate.exe submit .
22.01 ZS v1.5.5 R3.zip
Expected behavior
The pull request to be submitted without a crash.
Actual behavior
The pull request submit part causes a crash without a pull request having been submitted.
Environment
Windows-Paket-Manager Manifest Creator v1.5.7.0
Betriebssystem: Microsoft Windows NT 10.0.19045.0
Systemarchitektur: X64
WinGet-Create-Verzeichnisse Pfad
--------------------------------------------------------------------------------------------------------------------------------------------
Protokolle %LOCALAPPDATA%\Packages\Microsoft.WindowsPackageManagerManifestCreator_8wekyb3d8bbwe\LocalState\DiagOutputDir
Benutzereinstellungen %LOCALAPPDATA%\Packages\Microsoft.WindowsPackageManagerManifestCreator_8wekyb3d8bbwe\LocalState\settings.json
Installercache %TEMP%\wingetcreate
This is because winget-create constructs the GitHub branch name using the PackageId and the PackageVersion. Since the version has a whitespace (and winget-create is not cleaning the branch name before constructing it), it is failing to create a PR.
- PR #499 will fix this