mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
Fix run_node.py symlink.
This commit is contained in:
parent
7bbf7943ae
commit
5aeaad9a6a
2 changed files with 5 additions and 6 deletions
|
@ -35,8 +35,6 @@ install:
|
|||
- export PATH=`pwd`/third_party/llvm-build/Release+Asserts/bin:$PATH
|
||||
- export CCACHE_CPP2=yes
|
||||
- export CCACHE_SLOPPINESS=time_macros
|
||||
# Re-symlink node_modules.
|
||||
- rm -f $BUILD_PATH/node_modules
|
||||
# In case gn gen args change, delete args.gn to avoid using cached values.
|
||||
- rm -f $BUILD_PATH/args.gn
|
||||
# is_debug, use_allocator, and ccache are used to speed travis.
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue