From d63caa7776e1e87d558bc8c26f97470d00f289eb Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 22 Jul 2022 19:30:44 +0200 Subject: [PATCH] Fixing app without arguments --- helpers/apps | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helpers/apps b/helpers/apps index 0faad863c..85b74de15 100644 --- a/helpers/apps +++ b/helpers/apps @@ -31,8 +31,11 @@ ynh_install_apps() { if ! yunohost app list --output-as json --quiet | jq -e --arg id $one_app '.apps[] | select(.id == $id)' >/dev/null then # Retrieve the arguments of the app (part after ?) - local one_argument=$(cut -d "?" -f2- <<< "$one_app_and_its_args") - [ ! -z "$one_argument" ] && one_argument="--args $one_argument" + local one_argument="" + if [[ "$one_app_and_its_args" == *"?"* ]]; then + one_argument=$(cut -d "?" -f2- <<< "$one_app_and_its_args") + one_argument="--args $one_argument" + fi # Install the app with its arguments yunohost app install $one_app $one_argument