mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-10-29 17:21:44 +00:00
localdisks: say so when the option is only in the environment (#3130)
An env_vars entry is stored under .env_vars[] in /data/options.json, and bashio::config reads the addon's own options, so localdisks added to env_vars is invisible to the gate in 00-local_mounts.sh. The whole mount block was then skipped without printing anything: the log showed the available-disk list and nothing else, which is what #3129 reports. 00-global_var.sh exports both the options and the env_vars entries, so the variable is in the environment in either case. The new branch therefore fires only when the variable is set while the option is not, and says which input mounting reads without asserting how the user set it. Nothing is printed when no local disk is configured at all, which is the normal case in the 64 addons that ship this module. Co-authored-by: BirdNET-Go Addon Builder <addon-builder@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2 files changed
+13
No files matched your search
@@ -163,4 +163,16 @@ if bashio::config.has_value 'localdisks'; then
|
||||
)
|
||||
done
|
||||
|
||||
else
|
||||
|
||||
# An env_vars entry is stored under .env_vars[] in /data/options.json, so
|
||||
# bashio::config never sees it and the mount block above is skipped without a
|
||||
# word (alexbelgium/hassio-addons#3129). 00-global_var.sh exports every option
|
||||
# and every env_vars entry, so the variable is in the environment either way:
|
||||
# say something only when it is there, and do not guess which of the two it was
|
||||
if [ -n "${localdisks:-}" ]; then
|
||||
bashio::log.warning "localdisks is set in the environment, but not as an addon option, so no local disk was mounted."
|
||||
bashio::log.warning "Mounting reads the addon's own localdisks option : if you added localdisks to env_vars, set it in the addon configuration instead."
|
||||
fi
|
||||
|
||||
fi
|
||||
@@ -1,3 +1,4 @@
|
||||
- Local disks: when `localdisks` is set in the environment (for example added to `env_vars`) but not as the addon's own option, the startup log now says so instead of skipping the mount silently (#3129).
|
||||
|
||||
## 35.0.2 (2026-10-16)
|
||||
- Update to latest version from linuxserver/docker-nextcloud (changelog : https://github.com/linuxserver/docker-nextcloud/releases)
|
||||
|
||||
Reference in new issue
Block a user