File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 66ROOT = abspath (join (dirname (__file__ ), ".." ))
77sys .path .insert (0 , ROOT )
88
9- from subprocess import Popen
9+ from subprocess import check_call , CalledProcessError
1010from shutil import move , rmtree
1111from argparse import ArgumentParser
1212from os .path import normpath , realpath
@@ -200,7 +200,12 @@ def main():
200200
201201 # Clean Export Directory
202202 if options .clean :
203- Popen (["git" , "clean" , "-fe" , "mbed-os" ]).wait ()
203+ try :
204+ check_call (["git" , "clean" , "-fe" , "mbed-os" ])
205+ except CalledProcessError :
206+ print "Warning: your directory was not cleaned because it was not" \
207+ " recognized as a git repo or you do not have git installed in" \
208+ " your path."
204209
205210 for mcu in options .mcu :
206211 zip_proj = not bool (options .source_dir )
You can’t perform that action at this time.
0 commit comments