Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic Reversed? #13

Open
asampat3090 opened this issue Oct 17, 2017 · 1 comment
Open

Logic Reversed? #13

asampat3090 opened this issue Oct 17, 2017 · 1 comment

Comments

@asampat3090
Copy link

It seems like the logic is reversed for the functions. As boolean operators i would expect EQ to return 1 if equals LT to return 1 if < and GT to return 1 if GT.

@daniel-barrows
Copy link

daniel-barrows commented Sep 14, 2018

@asampat3090 The return values follow bash conventions, where 0 is success/true, and 1 is failure/false. See https://stackoverflow.com/a/21439109.

This allows use in shell scripts like this:

semverEQ 3.4.5 3.4.5 && echo 'Yes! They are the same'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants