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

4.0 and 4.2 incorrectly identified as enterprise, $active includes "-ent" #85

Open
fsnow opened this issue Feb 24, 2023 · 0 comments
Open
Labels

Comments

@fsnow
Copy link

fsnow commented Feb 24, 2023

M-C02F13KPMD6M:~ frank.snow$ mongod --version
db version v4.2.24
git version: 5e4ec1d24431fcdd28b579a024c5c801b8cde4e2
allocator: system
modules: none
build environment:
    distarch: x86_64
    target_arch: x86_64

M-C02F13KPMD6M:~ frank.snow$     active=`mongod --version | grep "version\s*v[0-9]" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+([-_\.][a-zA-Z0-9]+)?' | head -1`

M-C02F13KPMD6M:~ frank.snow$     ent=`mongod --version | egrep "(modules:\s*)|\"enterprise\"?" | wc -l`

M-C02F13KPMD6M:~ frank.snow$ echo $active
4.2.24
M-C02F13KPMD6M:~ frank.snow$ echo $ent
1

M-C02F13KPMD6M:~ frank.snow$     if [[ $ent == *1 ]]; then
>       active="$active-ent"
>     fi
M-C02F13KPMD6M:~ frank.snow$ echo $active
4.2.24-ent

M-C02F13KPMD6M:~ frank.snow$ m
    4.0.28 
    4.2.24 
    4.4.19 
    5.0.15 
    6.0.4 

Does not show active version with asterisk because $active ends with -ent.

@stennie stennie added the bug label Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants