More stupid debugging because i can't even

This commit is contained in:
Alexandre Aubin 2024-01-01 23:20:49 +01:00
parent 3e1708969e
commit 81ffd3b7bf

View file

@ -79,9 +79,13 @@ _TEST_CONFIG_PANEL() {
_INSTALL_APP () {
local install_args="$(jq -r '.install_args' $current_test_infos)"
log_info "install_args: $install_args"
# Make sure we have a trailing & because that assumption is used in some sed regex later
[[ ${install_args: -1} == '&' ]] || install_args+="&"
[[ ${install_args:0:1} == '&' ]] || install_args="&$install_args"
log_info "install_args: $install_args"
# We have default values for domain, admin and is_public, but these
# may still be overwritten by the args ($@)
@ -98,6 +102,8 @@ _INSTALL_APP () {
install_args=$(echo $install_args | sed "s@\&$key=[^&]*\&@\&$key=$value\&@")
done
log_info "install_args: $install_args"
# Note : we do this at this stage and not during the parsing of check_process
# because this also applies to upgrades ... ie older version may have different args and default values
@ -121,11 +127,16 @@ _INSTALL_APP () {
else
local default_value=$(python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); d = t['install']['$ARG'].get('default'); assert d is not None, 'Missing default value'; print(d)" < $package_path/manifest.toml)
fi
log_info "adding $ARG"
log_info "install_args: $install_args"
[[ $? -eq 0 ]] || { log_error "Missing install arg $ARG ?"; return 1; }
[[ ${install_args: -1} == '&' ]] || install_args+="&"
install_args+="$ARG=$default_value"
log_info "install_args: $install_args"
fi
done
log_info "install_args: $install_args"
# Install the application in a LXC container
log_info "Running: yunohost app install --no-remove-on-failure --force /app_folder -a \"$install_args\""