Explorar el Código

Fix build for Windows path edge case

Victor Oliveira hace 5 años
padre
commit
2a72f491e4
No account linked to committer's email address

+ 6
- 12
buildroot/share/PlatformIO/scripts/common-features-dependencies.py Ver fichero

@@ -127,19 +127,13 @@ def install_features_dependencies():
127 127
 def search_compiler():
128 128
 	if env['PLATFORM'] == 'win32':
129 129
 		# the first path have the compiler
130
-		compiler_path = None
131 130
 		for path in env['ENV']['PATH'].split(';'):
132
-			if re.search(r'platformio\\packages.*\\bin', path):
133
-				compiler_path = path
134
-				break
135
-		if compiler_path == None:
136
-			print("Could not find the g++ path")
137
-			return None
138
-		
139
-		print(compiler_path)
140
-		for file in os.listdir(compiler_path):
141
-			if file.endswith("g++.exe"):
142
-				return file
131
+			if not re.search(r'platformio\\packages.*\\bin', path):
132
+				continue			
133
+			#print(path)
134
+			for file in os.listdir(path):
135
+				if file.endswith("g++.exe"):
136
+					return file
143 137
 		print("Could not find the g++")
144 138
 		return None
145 139
 	else:

Loading…
Cancelar
Guardar