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 6
6
ROOT = abspath (join (dirname (__file__ ), ".." ))
7
7
sys .path .insert (0 , ROOT )
8
8
9
- from subprocess import Popen
9
+ from subprocess import check_call , CalledProcessError
10
10
from shutil import move , rmtree
11
11
from argparse import ArgumentParser
12
12
from os .path import normpath , realpath
@@ -200,7 +200,12 @@ def main():
200
200
201
201
# Clean Export Directory
202
202
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."
204
209
205
210
for mcu in options .mcu :
206
211
zip_proj = not bool (options .source_dir )
You can’t perform that action at this time.
0 commit comments