From c26742f9b56cce595c345fdc8769292b30a95795 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Fri, 7 Jan 2022 11:07:36 +0100 Subject: [PATCH] use pio env for esptool path --- pio-tools/post_esp32.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pio-tools/post_esp32.py b/pio-tools/post_esp32.py index 66aab37de..662d011d8 100644 --- a/pio-tools/post_esp32.py +++ b/pio-tools/post_esp32.py @@ -18,14 +18,12 @@ Import("env") -import subprocess +platform = env.PioPlatform() + import sys +from os.path import join -from os.path import expanduser, join - -home = expanduser("~") -esptoolpath = join(home, ".platformio", "packages", "tool-esptoolpy") -sys.path.append(esptoolpath) +sys.path.append(join(platform.get_package_dir("tool-esptoolpy"))) import esptool def esp32_create_combined_bin(source, target, env):