solidarity icon indicating copy to clipboard operation
solidarity copied to clipboard

Version without leading `v` fails check

Open DanielMSchmidt opened this issue 5 years ago • 2 comments

I have a check for kind 0.6.1 which has the kind --version output of kind version 0.6.1. It fails with ✖ No version was detected from the output of the binary 'kind'

When kind was in version 0.5.1 the output was kind version v0.5.1, which was parsed successfully.

My rule definition is

{
  "$schema": "http://json.schemastore.org/solidaritySchema",
  "requirements": {
    "Node": [
      {
        "rule": "cli",
        "binary": "node",
        "semver": ">= 12.9.1"
      }
    ],
    "kind": [
      {
        "rule": "cli",
        "binary": "kind",
        "semver": "0.6.1"
      }
    ],
  }
}

DanielMSchmidt avatar Dec 05 '19 10:12 DanielMSchmidt

Hrmmm, seems like the regex is getting messed up by the v This code should have fixed it: https://github.com/infinitered/solidarity/blob/master/src/extensions/functions/removeNonVersionCharacters.ts

Let me dig deeper

GantMan avatar Dec 07 '19 19:12 GantMan

Can you verify kind -v fails? BC if it doesn't that's the problem. It tries -v first.

GantMan avatar Dec 07 '19 19:12 GantMan