From 8ea2a800882209621a4999c7d823670ed1c8bd1e Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Fri, 11 Apr 2014 19:58:52 -0700 Subject: [PATCH] Fixed #555. Fixed #350. --- scripts/devSetup/mongo.py | 5 ++++- scripts/devSetup/node.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/devSetup/mongo.py b/scripts/devSetup/mongo.py index 88de736af..e653219e1 100644 --- a/scripts/devSetup/mongo.py +++ b/scripts/devSetup/mongo.py @@ -38,7 +38,10 @@ class MongoDB(Dependency): def install_dependencies(self): install_directory = self.config.directory.bin_directory + os.sep + u"mongo" import shutil - shutil.copytree(self.findUnzippedMongoBinPath(),install_directory) + if os.path.exists(install_directory): + print(u"Skipping creation of " + install_directory + " because it exists.") + else: + shutil.copytree(self.findUnzippedMongoBinPath(),install_directory) def findUnzippedMongoBinPath(self): return self.downloader.download_directory + os.sep + \ diff --git a/scripts/devSetup/node.py b/scripts/devSetup/node.py index 065634aad..35d1daf30 100644 --- a/scripts/devSetup/node.py +++ b/scripts/devSetup/node.py @@ -49,7 +49,10 @@ class Node(Dependency): print("Copying node into /usr/local/bin/...") shutil.copy(unzipped_node_path + os.sep + "bin" + os.sep + "node","/usr/local/bin/") os.chmod("/usr/local/bin/node",S_IRWXG|S_IRWXO|S_IRWXU) - shutil.copytree(self.findUnzippedNodePath(),install_directory) + if os.path.exists(install_directory): + print(u"Skipping creation of " + install_directory + " because it exists.") + else: + shutil.copytree(self.findUnzippedNodePath(),install_directory) wants_to_upgrade = True if self.check_if_executable_installed(u"npm"): warning_string = u"A previous version of npm has been found. \nYou may experience problems if you have a version of npm that's too old.Would you like to upgrade?(y/n) "