| Index: build_tools/run_without_cygwin.py
|
| diff --git a/build_tools/run_without_cygwin.py b/build_tools/run_without_cygwin.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d299537b3484a14a5ca0a1ef48b1fd953f12db99
|
| --- /dev/null
|
| +++ b/build_tools/run_without_cygwin.py
|
| @@ -0,0 +1,32 @@
|
| +#!/usr/bin/env python
|
| +# Copyright 2014 the V8 project authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +"""This program wraps an arbitrary command since gn currently can only execute
|
| +scripts."""
|
| +
|
| +import os
|
| +import subprocess
|
| +import sys
|
| +
|
| +try:
|
| + env = os.environ
|
| + if "PATH" in env:
|
| + path = env["PATH"]
|
| + if "cygwin" in path:
|
| + # Needed to make pkgdata and similar work.
|
| + print("Removing cygwin from path.")
|
| + parts = path.split(";")
|
| + path = ";".join([x for x in parts if not "cygwin" in x])
|
| + env["PATH"] = path
|
| + res = subprocess.call(sys.argv[1:], env=env)
|
| +except Exception as e:
|
| + res = 1
|
| + print("%s" % e)
|
| +
|
| +if res != 0:
|
| + print("In %s" % os.getcwd())
|
| + print("%s" % sys.argv)
|
| +
|
| +sys.exit(res)
|
|
|