From 24d06708430b9a7ff76962a9efd768d83fca43bc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:08:30 +0000 Subject: [PATCH] Fix: source cont-init.d scripts instead of bash to inherit bashio functions Agent-Logs-Url: https://github.com/alexbelgium/hassio-addons/sessions/88474b87-22ad-4e13-9d5c-8567d0b4098f Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> --- maintainerr/rootfs/ha_entrypoint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/maintainerr/rootfs/ha_entrypoint.sh b/maintainerr/rootfs/ha_entrypoint.sh index 909b10c43..c37814804 100755 --- a/maintainerr/rootfs/ha_entrypoint.sh +++ b/maintainerr/rootfs/ha_entrypoint.sh @@ -18,8 +18,10 @@ if [ -d /etc/cont-init.d ]; then for script in /etc/cont-init.d/*.sh; do [ -f "$script" ] || continue echo "[Maintainerr] Running init script: $script" - # Use bash directly (no S6 with-contenv available) - bash "$script" + # Source the script so it inherits bashio functions from bashio-standalone. + # Using bash "$script" would spawn a new process without bashio:: functions, + # causing "command not found" failures under set -e. + source "$script" done fi