1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-29 16:30:56 -05:00
denoland-deno/deno2/js/run_node.py
2018-06-10 01:02:08 +02:00

14 lines
329 B
Python
Executable file

#!/usr/bin/env python
"""
gn can only run python scripts.
Also Node programs except to be run with cwd = $root_dir/js so it can resolve
node_modules.
"""
import subprocess
import sys
import os
js_path = os.path.dirname(os.path.realpath(__file__))
os.chdir(js_path)
args = ["node"] + sys.argv[1:]
sys.exit(subprocess.call(args))