microsoft / winget-create

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

When Version is a Floating Point Number, it is Not Quoted #417

Closed Trenly closed 1 year ago

Trenly commented 1 year ago

Brief description of your issue

If package version is a floating point number, it doesn't get quoted https://repology.org/log/1208825

Steps to reproduce

Use a package version like 6.81

Expected behavior

PackageVersion: "6.81"

Actual behavior

PackageVersion: 6.81

# Created using wingetcreate 1.2.7.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.4.0.schema.json

PackageIdentifier: Cockos.REAPER
PackageVersion: 6.81
Platform:
- Windows.Desktop

Environment

.
mdanish-kh commented 1 year ago

Looked into this a bit, and there is a pull request waiting to be merged for the YAML library winget-create uses. I believe we can update the dependency version once that makes into a release

Probably depends on

ryfu-msft commented 1 year ago

Agree with @mdanish-kh. (Thanks for the investigation!)

We could probably come up with some hacky way to add quotes to the package version, but since everything flows through the YAML library for serialization when outputting the yaml file, it would be best to let them handle that conversion which should be resolved once this PR get checked in: https://github.com/aaubry/YamlDotNet/pull/827