onflow/flow-js-testing

Issue parsing the version number

Luze26 opened this issue · 3 comments

When having the last Flow CLI version installed and using flow-js-testing 0.6.0-stable-cadence.3.
The emulator failed to start (when doing emulator.start()) due to the fact the code was not able to parse the CLI version response.

const versionStr = JSON.parse(stdout).version

stdout is not a json, The CLI returns something like that with my version:

Version: v1.15.0-cadence-v1.0.0-preview.13
Commit: 8b6842e043a011cd8b3bb2f43e6e75cd17b713c3

I'll try to do a PR when I have time.

I tried to do a PR here #235 .
Sorry if I didn't respect some standards or rules, I'm not used to do PRs on open source repo.
Also I was not able to run tests locally.

Awesome thanks for your contribution @Luze26, if you update to the latest Cadence 1.0 CLI Version, this issue will be resolved (JSON version output is a somewhat new feature) but I can still look at the PR for backward-compatibility reasons.

(I'd recommend updating your Cadence 1.0 CLI regardless, as only the latest CLI versions have the latest features/changes)

oh ok thanks, I thought I was on the latest version.