aboutsummaryrefslogtreecommitdiff
path: root/build/lib
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-10-01 18:19:08 -0700
committerDan Albert <danalbert@google.com>2015-10-01 18:19:47 -0700
commitd5c979a44510992f1aa5984aa44d53c424d6790e (patch)
tree8f1d2bfe3ba62d96e9a2f1ffe0495a403a7dac54 /build/lib
parentb7ece77eed5d01bd3e416afed19d29b9501cdabb (diff)
downloadndk-d5c979a44510992f1aa5984aa44d53c424d6790e.tar.gz
Fix chdir in build_support.run for this dir.
Previously would try to run os.chdir('') and fail. Change-Id: I165d36e0249bb5e81380963f31ccec636a1998d1
Diffstat (limited to 'build/lib')
-rw-r--r--build/lib/build_support.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/build/lib/build_support.py b/build/lib/build_support.py
index 896754cc3..fff7b06ef 100644
--- a/build/lib/build_support.py
+++ b/build/lib/build_support.py
@@ -147,7 +147,7 @@ def run(main_func, arg_parser=ArgParser):
args = arg_parser().parse_args()
# We want any paths to be relative to the invoked build script.
- main_filename = sys.modules['__main__'].__file__
+ main_filename = os.path.realpath(sys.modules['__main__'].__file__)
os.chdir(os.path.dirname(main_filename))
main_func(args)