helpers2.1: fix unecessary change in ynh_read_manifest, key shouldnt need to be prefixed with .

This commit is contained in:
Alexandre Aubin 2024-06-16 14:12:11 +02:00
parent 800f93d12e
commit 5a6a8e6c73

View file

@ -148,7 +148,7 @@ ynh_setup_source() {
source_id="${source_id:-main}" source_id="${source_id:-main}"
# =========================================== # ===========================================
local sources_json=$(ynh_read_manifest ".resources.sources[\"$source_id\"]") local sources_json=$(ynh_read_manifest "resources.sources[\"$source_id\"]")
if jq -re ".url" <<< "$sources_json" if jq -re ".url" <<< "$sources_json"
then then
local arch_prefix="" local arch_prefix=""
@ -456,7 +456,7 @@ ynh_safe_rm() {
# #
# Requires YunoHost version 3.5.0 or higher. # Requires YunoHost version 3.5.0 or higher.
ynh_read_manifest() { ynh_read_manifest() {
cat $YNH_APP_BASEDIR/manifest.toml | toml_to_json | jq "$1" --raw-output cat $YNH_APP_BASEDIR/manifest.toml | toml_to_json | jq ".$1" --raw-output
} }
# Return the app upstream version, deduced from `$YNH_APP_MANIFEST_VERSION` and strippig the `~ynhX` part # Return the app upstream version, deduced from `$YNH_APP_MANIFEST_VERSION` and strippig the `~ynhX` part