Skip to content

winget validate returns a non-zero exit code if Agreements are present #3405

Closed

Description

Brief description of your issue

I forsee this being a problem for when our organization gets verified as the developer of package we submit.

We create our winget PRs via automated GitHub actions upon releasing. As part of this process, we run winget validate on the manifest to be uploaded. If we want to add an Agreements section in the future, we have no way to suppress the warning that having that section creates.

Can we have a flag to disable this warning or some other way to get a zero exit code with Agreements present?

Steps to reproduce

  1. Add an Agreements section to a manifest with at least one entry.
  2. Run winget validate on the manifest.
  3. Check the exit code.

Expected behavior

A zero exit code or a way to suppress the error

Actual behavior

PS S:\workspace\tgstation-server\build\package\winget\manifest> winget validate --manifest .
Manifest validation succeeded with warnings.
Manifest Warning: Field usage requires verified publishers. [Agreements]

PS S:\workspace\tgstation-server\build\package\winget\manifest> echo $LastExitCode
-1978335192

Environment

PS S:\workspace\tgstation-server\build\package\winget\manifest> winget --info
Windows Package Manager (Preview) v1.6.1573-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.3086
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.1573.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages

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                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    In-PRIssue related to a PRIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions