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:
@ -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__':
|
||||
|
||||
Reference in New Issue
Block a user