mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 20:11:24 +00:00
Fix processing of empty add-on config (#91)
This commit is contained in:
parent
4d2fa76db6
commit
69608c0d12
1 changed files with 8 additions and 0 deletions
|
@ -562,6 +562,14 @@ function bashio::addon.config() {
|
||||||
|
|
||||||
response=$(bashio::api.supervisor GET "/addons/self/options/config" false)
|
response=$(bashio::api.supervisor GET "/addons/self/options/config" false)
|
||||||
|
|
||||||
|
# If the add-on has no configuration, it returns an empty string.
|
||||||
|
# This is Bashio logic, that is problematic in this case, so make it a
|
||||||
|
# emtpty JSON object instead.
|
||||||
|
if bashio::var.is_empty "${response}";
|
||||||
|
then
|
||||||
|
response="{}"
|
||||||
|
fi
|
||||||
|
|
||||||
bashio::cache.set "${cache_key}" "${response}"
|
bashio::cache.set "${cache_key}" "${response}"
|
||||||
printf "%s" "${response}"
|
printf "%s" "${response}"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue