From 685ebe2adc17f3725b627a86793c865000d01d09 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Sun, 31 Aug 2025 14:44:16 +0200 Subject: [PATCH] Ensure Git is installed for Platform espressif32 Added a check for Git installation and error handling. --- platform.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform.py b/platform.py index 6439beaf9..3f4c96642 100644 --- a/platform.py +++ b/platform.py @@ -94,6 +94,12 @@ if IS_WINDOWS: os.environ["PLATFORMIO_SYSTEM_TYPE"] = "windows_amd64" +# exit without git +if not shutil.which("git"): + print("Git not found in PATH, please install Git.", file=sys.stderr) + print("Git is needed for Platform espressif32 to work.", file=sys.stderr) + raise SystemExit(1) + # Set IDF_TOOLS_PATH to Pio core_dir PROJECT_CORE_DIR=ProjectConfig.get_instance().get("platformio", "core_dir") IDF_TOOLS_PATH=os.path.join(PROJECT_CORE_DIR)