diff --git a/cli_snapshots/BUILD.gn b/cli_snapshots/BUILD.gn index c29b18d54d7ac6..3567f6171f9f88 100644 --- a/cli_snapshots/BUILD.gn +++ b/cli_snapshots/BUILD.gn @@ -99,8 +99,6 @@ action("deno_cli_snapshots_build_run") { ] args = [ rebase_path("$root_out_dir/deno_cli_snapshots_build"), - rebase_path(".", root_build_dir), - rebase_path(root_out_dir), ] deps = [ ":deno_cli_snapshots_build", diff --git a/cli_snapshots/run.py b/cli_snapshots/run.py index 9cc48d1ba2cc16..eb9fd4653a39a2 100644 --- a/cli_snapshots/run.py +++ b/cli_snapshots/run.py @@ -1,19 +1,13 @@ #!/usr/bin/env python # Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -# This file just executes its arguments, except that also adds GN_OUT_DIR and -# CARGO_PKG_VERSION to the environ. This is for compatibility with cargo. import subprocess import sys import os -import re +d = os.path.dirname(os.path.realpath(__file__)) exe = sys.argv[1] -d = sys.argv[2] -root_out_dir = sys.argv[3] - env = os.environ.copy() -env["CARGO_MANIFEST_DIR"] = os.path.abspath(d) -env["OUT_DIR"] = root_out_dir - +env["CARGO_MANIFEST_DIR"] = d +env["OUT_DIR"] = os.path.dirname(exe) os.chdir(d) -sys.exit(subprocess.call([exe, "foo"], env=env)) +sys.exit(subprocess.call([exe], env=env))