From 5aeaad9a6a815533c814c9e7eaedcf0385eefdb9 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 23 Jun 2018 11:40:28 +0200 Subject: Fix run_node.py symlink. --- src/js/run_node.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/js/run_node.py') diff --git a/src/js/run_node.py b/src/js/run_node.py index bdf132ae5..506f2be4c 100755 --- a/src/js/run_node.py +++ b/src/js/run_node.py @@ -27,12 +27,13 @@ def symlink(target, name, target_is_dir=False): js_path = os.path.dirname(os.path.realpath(__file__)) -node_modules_path = os.path.join(js_path, "node_modules") +target_abs = os.path.join(js_path, "node_modules") +target_rel = os.path.relpath(target_abs) -if not os.path.lexists("node_modules"): - if os.path.exists("node_modules"): +if not os.path.exists("node_modules"): + if os.path.lexists("node_modules"): os.unlink("node_modules") - symlink(node_modules_path, "node_modules", True) + symlink(target_rel, "node_modules", True) args = ["node"] + sys.argv[1:] sys.exit(subprocess.call(args)) -- cgit v1.2.3