moonrepo / proto

A pluggable multi-language version manager.
https://moonrepo.dev/proto
MIT License
631 stars 30 forks source link

invalid leading zero in patch version number #585

Closed W1M0R closed 3 weeks ago

W1M0R commented 1 month ago

What version?

0.39.7

Which command?

proto install

What happened?

Trying to install pandoc using proto results in the following error:

Error: plugin::call_func::failed

  × invalid leading zero in patch version number

This is the release of Pandoc that I'm trying to install: https://github.com/jgm/pandoc/releases/tag/3.3

This is the .prototools (redacted):

pandoc = "3.3"

[plugins]
pandoc = "file://etc/proto/pandoc/plugin.toml"

This is the pandoc plugin.toml (work in progress, but can't proceed with testing it until the version issue is resolved):

name = "pandoc"
type = "cli"

[resolve]
git-url = "https://github.com/jgm/pandoc"

[platform.linux]
download-file = "pandoc-{version}-linux-{arch}.tar.gz"

[platform.macos]
download-file = "pandoc-{version}-{arch}-macOS.zip"

[platform.windows]
download-file = "pandoc-{version}-windows-{arch}.zip"

[install]
download-url = "https://github.com/jgm/pandoc/releases/download/{version}/{download_file}"

Trace logs?

Quite verbose, but can provide it if the issue is not clear.

Operating system?

Windows

Architecture?

x64

milesj commented 1 month ago

@W1M0R Are you sure this is failing on 3.3? The regex by default requires a fully qualified version: https://github.com/moonrepo/tools/blob/master/tools/internal-schema/src/schema.rs#L92

There's a lot of other tags here: https://github.com/jgm/pandoc/tags

milesj commented 3 weeks ago

Gonna close this. You'll most likely need to add your own version pattern here.