Skip to content

Commit 8624f49

Browse files
committed
fixes esp32 build
1 parent 77288cd commit 8624f49

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

builder/__init__.py

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -213,32 +213,33 @@ def get_pycparser():
213213

214214

215215
def _busy_spinner(evnt):
216-
while not evnt.is_set():
217-
sys.stdout.write('.')
216+
if 'GITHUB_RUN_ID' in os.environ:
217+
while not evnt.is_set():
218+
sys.stdout.write('.')
219+
sys.stdout.flush()
220+
evnt.wait(2)
221+
222+
else:
223+
count = random.randint(1, 25)
224+
wait = random.randint(10, 100) * 0.001
225+
chars = '\\|/-'
226+
char_index = 0
227+
sys.stdout.write(chars[char_index] + '\r')
218228
sys.stdout.flush()
219-
evnt.wait(2)
220-
221-
# else:
222-
# count = random.randint(1, 25)
223-
# wait = random.randint(10, 100) * 0.001
224-
# chars = '\\|/-'
225-
# char_index = 0
226-
# sys.stdout.write(chars[char_index] + '\r')
227-
# sys.stdout.flush()
228-
#
229-
# while not evnt.is_set():
230-
# evnt.wait(wait)
231-
# count -= 1
232-
# char_index += 1
233-
# if char_index == 4:
234-
# char_index = 0
235-
#
236-
# sys.stdout.write(f'{chars[char_index]}\r')
237-
# sys.stdout.flush()
238-
#
239-
# if count == 0:
240-
# count = random.randint(1, 25)
241-
# wait = random.randint(10, 100) * 0.001
229+
230+
while not evnt.is_set():
231+
evnt.wait(wait)
232+
count -= 1
233+
char_index += 1
234+
if char_index == 4:
235+
char_index = 0
236+
237+
sys.stdout.write(f'{chars[char_index]}\r')
238+
sys.stdout.flush()
239+
240+
if count == 0:
241+
count = random.randint(1, 25)
242+
wait = random.randint(10, 100) * 0.001
242243

243244

244245
def spawn(cmd_, out_to_screen=True, spinner=False, env=None, cmpl=False):
@@ -356,6 +357,9 @@ def _convert_line(lne):
356357
event.set()
357358
t.join()
358359

360+
sys.stdout.write('\n')
361+
sys.stdout.flush()
362+
359363
output_buffer = '\n'.join(output_buffer)
360364

361365
if out_to_screen:

builder/esp32.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ def setup_idf_environ():
308308
]
309309
else:
310310
env_cmds = [
311-
'echo "C:/Program Files (x86)/Etc" >> $GITHUB_PATH'
312311
['echo', f"{py_path}", '>>', '$GITHUB_PATH'],
313312
['echo', f"{os.path.abspath(idf_path)}", '>>', '$GITHUB_PATH']
314313
]

0 commit comments

Comments
 (0)