diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-06-23 11:40:28 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-06-25 23:07:57 +0200 |
commit | 5aeaad9a6a815533c814c9e7eaedcf0385eefdb9 (patch) | |
tree | 9c8adedc51a4348483366f505952726aa5f385ea /src | |
parent | 7bbf7943aec6f7560cddfe6f17b653fbd746ebca (diff) |
Fix run_node.py symlink.
Diffstat (limited to 'src')
-rwxr-xr-x | src/js/run_node.py | 9 |
1 files changed, 5 insertions, 4 deletions
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)) |