mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
Fix build for Windows path edge case
This commit is contained in:
parent
f1ffca1d2d
commit
2a72f491e4
@ -127,17 +127,11 @@ def install_features_dependencies():
|
|||||||
def search_compiler():
|
def search_compiler():
|
||||||
if env['PLATFORM'] == 'win32':
|
if env['PLATFORM'] == 'win32':
|
||||||
# the first path have the compiler
|
# the first path have the compiler
|
||||||
compiler_path = None
|
|
||||||
for path in env['ENV']['PATH'].split(';'):
|
for path in env['ENV']['PATH'].split(';'):
|
||||||
if re.search(r'platformio\\packages.*\\bin', path):
|
if not re.search(r'platformio\\packages.*\\bin', path):
|
||||||
compiler_path = path
|
continue
|
||||||
break
|
#print(path)
|
||||||
if compiler_path == None:
|
for file in os.listdir(path):
|
||||||
print("Could not find the g++ path")
|
|
||||||
return None
|
|
||||||
|
|
||||||
print(compiler_path)
|
|
||||||
for file in os.listdir(compiler_path):
|
|
||||||
if file.endswith("g++.exe"):
|
if file.endswith("g++.exe"):
|
||||||
return file
|
return file
|
||||||
print("Could not find the g++")
|
print("Could not find the g++")
|
||||||
|
Loading…
Reference in New Issue
Block a user