summaryrefslogtreecommitdiff
path: root/tools/util.py
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2019-03-04 20:56:07 -0800
committerBert Belder <bertbelder@gmail.com>2019-03-04 21:01:52 -0800
commitee29ed79a7539dbc821495106da9308e6c0ef295 (patch)
tree8e80105053781f6724bb2de0f807f1537629ab8d /tools/util.py
parent860be9f0de0713150030428db44d326831ce6ad2 (diff)
tools/run_node: only create 'node_modules' symlink once
Previously run_node.py would always attempt to remove and then re-create the 'target/xx/node_modules' symlink. This causes sporadic build errors on windows when multiple build targets that use run_node.py are being built concurrently.
Diffstat (limited to 'tools/util.py')
-rw-r--r--tools/util.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/tools/util.py b/tools/util.py
index 8ab82e2d3..fc307512d 100644
--- a/tools/util.py
+++ b/tools/util.py
@@ -93,20 +93,6 @@ def green_ok():
return "%sok%s" % (FG_GREEN, RESET)
-def remove_and_symlink(target, name, target_is_dir=False):
- if os.name != "nt" and os.path.islink(name):
- return
- try:
- # On Windows, directory symlink can only be removed with rmdir().
- if os.name == "nt" and os.path.isdir(name):
- os.rmdir(name)
- else:
- os.unlink(name)
- except OSError:
- pass
- symlink(target, name, target_is_dir)
-
-
def symlink(target, name, target_is_dir=False):
if os.name == "nt":
from ctypes import WinDLL, WinError, GetLastError