GalaChain / GalaChain/sdk

Wrong version comparison in CLI for checking for newer versions

Open
#394 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
TypeScript
Stars
138
Forks
44
Avg merge
1d 16h
Merged PRs (30d)
22

Description

This is the code from CLI:

```
const cliLatestVersion = execSync("npm show @gala-chain/cli version");
const cliCurrentVersion = execSync("galachain --version").split(" ")[0].split("/")[2];
if (cliLatestVersion > cliCurrentVersion) {
```

It compares by a string, which is inappropriate, because for instance `1.4.10 < 1.4.9`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.