[core] Stop parent git repos from breaking ESP-IDF/PlatformIO builds (#16994)

This commit is contained in:
Jesse Hills
2026-06-16 20:24:26 +12:00
committed by GitHub
parent b09a5f9e43
commit d8fa0e4140
6 changed files with 78 additions and 0 deletions
@@ -304,6 +304,11 @@ def test_run_platformio_cli_sets_environment_variables(
)
assert "PLATFORMIO_LIBDEPS_DIR" in os.environ
assert "PYTHONWARNINGS" in os.environ
# Caps git's upward search at the config dir so an uninitialized or
# corrupt parent git repo can't break the framework's `git describe`.
assert str(CORE.config_dir) in os.environ["GIT_CEILING_DIRECTORIES"].split(
os.pathsep
)
# Check command was called correctly — runs PlatformIO as a subprocess
# via the esphome.platformio.runner entry point.