Index: tools/dart/update.py |
diff --git a/tools/dart/update.py b/tools/dart/update.py |
index 3bc9a63759b32dd1132177a4bdc8181912af4854..00db7912736ce8e74469ce22d84352bd224f9237 100755 |
--- a/tools/dart/update.py |
+++ b/tools/dart/update.py |
@@ -54,7 +54,8 @@ def main(): |
if get_sdk: |
# Completely remove all traces of the previous SDK. |
- shutil.rmtree(DART_SDK_DIR) |
+ if os.path.exists(DART_SDK_DIR): |
+ shutil.rmtree(DART_SDK_DIR) |
os.mkdir(DART_SDK_DIR) |
wget_command = ['wget', '-N', '-c', LINUX_64_SDK, '-P', DART_SDK_DIR] |