Validate VERSION
will be parsable by semver
at runtime
#3479
Labels
CI
CLI
DX/GENERAL
Developer Experience General
good first issue
Good for newcomers
Installation
no-issue-activity
Related: #2949
Due to how we include the platform version number in the CLI, if there is any leading/trailing whitespace, parsing for semver may fail. We handle this case inconsistently.
fluvio/crates/fluvio-cli/src/lib.rs
Line 16 in d2b7ccf
fluvio version
can handle whitespacefluvio/crates/fluvio-cli/src/version.rs
Line 23 in d2b7ccf
But
fluvio install/update
(and many other places) do not include.trim()
fluvio/crates/fluvio-cli/src/install/update.rs
Line 282 in d2b7ccf
There is no known workaround after compilation, but
VERSION
requirements should also be less strict. We should support basic whitespace trimming and address the root issue.And rather than handle case-by-case, we should validate that
VERSION
is valid during buildtime. But the CLI build should fail in cases whenVERSION
can't be parsed due to actual semver validity.The text was updated successfully, but these errors were encountered: