mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Install argument fixes
This commit is contained in:
parent
f9f0511e9c
commit
b1f78eba29
1 changed files with 5 additions and 1 deletions
|
@ -46,6 +46,9 @@ _PREINSTALL () {
|
||||||
_INSTALL_APP () {
|
_INSTALL_APP () {
|
||||||
local install_args="$(jq -r '.install_args' $current_test_infos)"
|
local install_args="$(jq -r '.install_args' $current_test_infos)"
|
||||||
|
|
||||||
|
# Make sure we have a trailing & because that assumption is used in some sed regex later
|
||||||
|
[[ ${install_args: -1} == '&' ]] || install_args+="&"
|
||||||
|
|
||||||
# We have default values for domain, user and is_public, but these
|
# We have default values for domain, user and is_public, but these
|
||||||
# may still be overwritten by the args ($@)
|
# may still be overwritten by the args ($@)
|
||||||
for arg_override in "domain=$SUBDOMAIN" "admin=$TEST_USER" "user=$TEST_USER" "is_public=1" "$@"
|
for arg_override in "domain=$SUBDOMAIN" "admin=$TEST_USER" "user=$TEST_USER" "is_public=1" "$@"
|
||||||
|
@ -71,7 +74,8 @@ _INSTALL_APP () {
|
||||||
then
|
then
|
||||||
local default_value=$(jq -e -r --arg ARG $ARG '.arguments.install[] | select(.name==$ARG) | .default' $package_path/manifest.json)
|
local default_value=$(jq -e -r --arg ARG $ARG '.arguments.install[] | select(.name==$ARG) | .default' $package_path/manifest.json)
|
||||||
[[ $? -eq 0 ]] || { log_error "Missing install arg $ARG ?"; return 1; }
|
[[ $? -eq 0 ]] || { log_error "Missing install arg $ARG ?"; return 1; }
|
||||||
install_args+="$ARG=$default_value&"
|
[[ ${install_args: -1} == '&' ]] || install_args+="&"
|
||||||
|
install_args+="$ARG=$default_value"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue