mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-08-04 12:20:33 +02:00
Three minimum-scope robustness fixes in .templates/00-global_var.sh: 1. shell_quote no longer doubles backslashes inside single quotes (e.g. 'C:\Users\test' was producing 'C:\\Users\\test' in injected scripts) and now uses the canonical '\'' escape for single quotes instead of the buggy '"'"' + trailing-space-trim form, which was mangling values containing apostrophes (e.g. "it's" -> "it' s"). 2. /.env and /etc/environment are now patched in place: existing content from the upstream image and the system (PATH, LANG, etc.) is preserved and only the marked ADDON ENV block is replaced. Previously the whole files were overwritten, destroying upstream defaults. 3. Writing to /var/run/s6/container_environment is now best-effort (|| true) so a read-only mount on a single entry cannot abort the rest of the env injection under set -e.