From 6bcf91b3613f28a16c9aa431d44e8ccc807af577 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 1 Sep 2026 01:34:09 +0200 Subject: [PATCH] Keep the config directory out of sys.path in the container (#180967) --- rootfs/etc/services.d/home-assistant/run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/services.d/home-assistant/run b/rootfs/etc/services.d/home-assistant/run index 950c6a6250e3..34e5bd6acd04 100755 --- a/rootfs/etc/services.d/home-assistant/run +++ b/rootfs/etc/services.d/home-assistant/run @@ -15,4 +15,5 @@ if [[ -n "${DISABLE_JEMALLOC+x}" ]]; then bashio::log.warning "DISABLE_JEMALLOC is set but no longer has any effect: jemalloc has been replaced by mimalloc. Set PYTHONMALLOC=pymalloc to use the default allocator instead." fi -exec python3 -m homeassistant --config /config +# -P keeps the working directory out of sys.path, so /config cannot shadow imports. +exec python3 -P -m homeassistant --config /config