Skip to content

Commit 9d2eb10

Browse files
Try and Windows-ize paths in build.py
1 parent 378fc98 commit 9d2eb10

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/build.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@
2929
import tempfile
3030
import shutil
3131

32+
33+
def windowsize_paths(l):
34+
out = []
35+
for i in l:
36+
if i.startswith('/'):
37+
i = 'C:' + i
38+
out += [i.replace('/', '\\')]
39+
return out
40+
3241
def compile(tmp_dir, sketch, cache, tools_dir, hardware_dir, ide_path, f, args):
3342
cmd = []
3443
cmd += [ide_path + '/arduino-builder']
@@ -65,6 +74,9 @@ def compile(tmp_dir, sketch, cache, tools_dir, hardware_dir, ide_path, f, args):
6574
cmd += ['-verbose']
6675
cmd += [sketch]
6776

77+
if platform.system() == "Windows":
78+
cmd = windowsize_paths(cmd)
79+
6880
if args.verbose:
6981
print('Building: ' + " ".join(cmd), file=f)
7082

0 commit comments

Comments
 (0)