microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.28k stars 1.45k forks source link

Winget Validate Misses Blatant Manifest Errors #1248

Open Trenly opened 3 years ago

Trenly commented 3 years ago

Brief description of your issue

Steps to reproduce

Expected behavior

The validation should fail in two different places.

Actual behavior

The package is passing validation. image

Additional Information

PR showing failures - https://github.com/microsoft/winget-pkgs/pull/19476 Commit 1 | Pipeline Fail 1 - filename Commit 2 | Pipeline Fail 2 - file path

Environment

[winget --info]
Windows Package Manager v1.0.11692
Windows: Windows.Desktop v10.0.19042.1052
Package: Microsoft.DesktopAppInstaller v1.12.11692.0

Any other software? None
jedieaston commented 3 years ago

The file path is an implementation detail of the community repo, I don't think it's supposed to be true of all scenarios you use a manifest in (winget will install from any folder as long as it finds enough data in the yaml files).

Trenly commented 3 years ago

That does make sense, I did not consider that some people may not use winget-create. Although, if manifests are being validated, there is an extremely high likelihood it is for the public repository. Perhaps a warning would be beneficial? That way if a user is validating before a pull request they get warned about a mismatch (assuming the file path starts at ~/manifests) while still allowing those who are not working out of their manifests directory tree to continue validation

I would think, though, that the file names should still be checked in validation. Maybe a warning is appropriate for that also