summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rix <tom.rix@sony.com>2018-11-08 07:46:01 -0800
committerKim Gräsman <kim.grasman@gmail.com>2018-11-21 22:12:03 +0100
commit114934378ef98abf039b0a3d8f7867fd42193e44 (patch)
treea40c727bef15ffa6911ec517d8ab80624c07a45f
parent1c7977383916d564288536dbc5c408e5b7087656 (diff)
When include-what-you-use if found, return the real path
If iwyu_tool.py is call by a relative path, include-what-you-use will also be called with a static, relative path. Which breaks once the cwd changes. So force the tool path to be absolute.
-rwxr-xr-xiwyu_tool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/iwyu_tool.py b/iwyu_tool.py
index dcb7396..bdada75 100755
--- a/iwyu_tool.py
+++ b/iwyu_tool.py
@@ -108,7 +108,7 @@ def find_include_what_you_use():
for dirpath in search_path:
full = os.path.join(dirpath, executable_name)
if os.path.isfile(full):
- return full
+ return os.path.realpath(full)
return None