(not tested) Validate that all manifest install args are indeed provided to avoid miserably hanging forever

This commit is contained in:
Alexandre Aubin 2020-12-18 23:10:04 +01:00
parent 33c2095d29
commit a0be02d592

View file

@ -52,6 +52,11 @@ _INSTALL_APP () {
LXC_START "bash /preinstall.sh"
fi
for ARG in $(jq -r '.arguments.install[].name' $package_path/manifest.json)
do
echo "$install_args" | grep -q -E "\<$ARG=" || { log_error "Missing install arg $ARG ?"; return 1; }
done
# Install the application in a LXC container
log_info "Running: yunohost app install --force /app_folder -a $install_args"
_RUN_YUNOHOST_CMD "app install --force /app_folder -a $install_args"