We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3907bae + 4d09c4a commit 319b661Copy full SHA for 319b661
build_platform.py
@@ -179,9 +179,15 @@ def install_platform(platform):
179
180
def run_or_die(cmd, error):
181
print(cmd)
182
- if os.system(cmd) != 0:
183
- ColorPrint.print_fail(error)
184
- exit(-1)
+ attempt = 0
+ while attempt < 3:
+ if os.system(cmd) == 0:
185
+ return
186
+ attempt += 1
187
+ print('attempt {} failed, {} retry left'.format(attempt, 3-attempt))
188
+ time.sleep(5)
189
+ ColorPrint.print_fail(error)
190
+ exit(-1)
191
192
################################ Install Arduino IDE
193
print()
0 commit comments