-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) |