Skip to content

Handle null as version in pinning.db #3142

@Trenly

Description

@Trenly

Brief description of your issue

After manually editing pinning.db using DB Browser for SQLite, winget returns null when running upgrade / list commands.

After further investigation, this is because the version field for one entry was null and not empty

Steps to reproduce

Manually add an entry to the pinning database

image

Expected behavior

Null to be handled seamlessly

Actual behavior

Winget ceases to provide any package mapping during list / upgrade

Environment

PS D:\Git\winget-pkgs> winget --info
Windows Package Manager (Preview) v1.5.441-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.2728
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.441.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

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-PinIssue related to WinGet PinExperimentalThis experimental feature can be enabled in settingsIn-PRIssue related to a PRIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions