Do not delete temporary directory if user specified it manually.

This prevents user from accidentally specifying a directory that contains
files that the user wants to keep.

BUG=webrtc:7608
NOTRY=True

Review-Url: https://codereview.webrtc.org/2876803002
Cr-Commit-Position: refs/heads/master@{#18096}
This commit is contained in:
sakal
2017-05-11 03:36:21 -07:00
committed by Commit bot
parent 55dad1b9d0
commit 27ce02eb06

View File

@ -67,7 +67,9 @@ def main():
'--use-gradle-process-resources', '--split-projects'])
_RunCommand([GRADLEW_BIN, 'assembleDebug'], project_dir)
finally:
shutil.rmtree(project_dir, True)
# Do not delete temporary directory if user specified it manually.
if not args.project_dir:
shutil.rmtree(project_dir, True)
if __name__ == '__main__':