From b632b52b11cb116b70b51d15b0ecb17f5e2512b8 Mon Sep 17 00:00:00 2001
From: Victor Oliveira <rhapsodyv@gmail.com>
Date: Sat, 24 Oct 2020 18:25:14 -0300
Subject: [PATCH] Update PIO dependencies script

---
 buildroot/share/PlatformIO/scripts/common-dependencies.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.py b/buildroot/share/PlatformIO/scripts/common-dependencies.py
index 4b4bba6258..b9cefeab7c 100644
--- a/buildroot/share/PlatformIO/scripts/common-dependencies.py
+++ b/buildroot/share/PlatformIO/scripts/common-dependencies.py
@@ -208,7 +208,8 @@ def search_compiler():
 		for filepath in os.listdir(pathdir):
 			if not filepath.endswith(gcc):
 				continue
-
+			# Use entire path to not rely on env PATH
+			filepath = os.path.sep.join([pathdir, filepath])
 			# Cache the g++ path to no search always
 			if os.path.exists(ENV_BUILD_PATH):
 				blab('Caching g++ for current env')