Merge pull request #1480 from YunoHost/one_arg

Fixing app without arguments
This commit is contained in:
Alexandre Aubin 2022-08-03 10:58:38 +02:00 committed by GitHub
commit 9b307d02c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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