helpers/mongo: less noisy output when checking the avx flag is here in /proc/cpuinfo

This commit is contained in:
Alexandre Aubin 2024-06-24 21:35:35 +02:00
parent 0aad13cd2f
commit 2af4c157d9
2 changed files with 2 additions and 2 deletions

View file

@ -310,7 +310,7 @@ ynh_install_mongo() {
ynh_print_info --message="Installing MongoDB Community Edition ..."
local mongo_debian_release=$(ynh_get_debian_release)
if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then
if [[ "$(grep '^flags' /proc/cpuinfo | uniq)" != *"avx"* && "$mongo_version" != "4.4" ]]; then
ynh_print_warn --message="Installing Mongo 4.4 as $mongo_version is not compatible with your cpu (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)."
mongo_version="4.4"
fi

View file

@ -226,7 +226,7 @@ ynh_install_mongo() {
ynh_print_info "Installing MongoDB Community Edition ..."
local mongo_debian_release=$YNH_DEBIAN_VERSION
if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then
if [[ "$(grep '^flags' /proc/cpuinfo | uniq)" != *"avx"* && "$mongo_version" != "4.4" ]]; then
ynh_print_warn "Installing Mongo 4.4 as $mongo_version is not compatible with your cpu (see https://docs.mongodb.com/manual/administration/production-notes/#x86_64)."
mongo_version="4.4"
fi