From 42f8c9dcc1ed03c3b1fc46d6a9c90562618d9dd9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 5 Apr 2021 18:35:42 +0200 Subject: [PATCH] Fix ynh_requirement parsing --- data/helpers.d/utils | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/helpers.d/utils b/data/helpers.d/utils index da414bd3e..8db83ef78 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -761,9 +761,9 @@ ynh_compare_current_package_version() { _ynh_apply_default_permissions() { local target=$1 - local ynh_requirement=$(jq -r '.requirements.yunohost' $YNH_APP_BASEDIR/manifest.json) + local ynh_requirement=$(jq -r '.requirements.yunohost' $YNH_APP_BASEDIR/manifest.json | tr -d '>= ') - if [ -z "$ynh_requirements" ] || [ "$ynh_requirements" == "null" ] || dpkg --compare-versions $ynh_requirements ge 4.2 + if [ -z "$ynh_requirement" ] || [ "$ynh_requirement" == "null" ] || dpkg --compare-versions $ynh_requirement ge 4.2 then chmod o-rwx $target chmod g-w $target