Skip to content

Commit

Permalink
Merge pull request #21 from kgfoundrydig/master
Browse files Browse the repository at this point in the history
Fix path replace problem
  • Loading branch information
ZedThree authored Jan 11, 2022
2 parents 7236873 + abc3f0b commit 89b85a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions review.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,14 @@ def main(
# unless it's '.', in which case use all of directory
if original_directory.endswith(args.build_dir):
build_dir_index = -(len(args.build_dir) + 1)
basedir = original_directory[:build_dir_index]
elif args.build_dir == ".":
build_dir_index = -1
basedir = original_directory
else:
raise RuntimeError(
f"compile_commands.json contains absolute paths that I don't know how to deal with: '{original_directory}'"
)

basedir = original_directory[:build_dir_index]
newbasedir = os.getcwd()

print(f"Replacing '{basedir}' with '{newbasedir}'", flush=True)
Expand Down

0 comments on commit 89b85a7

Please sign in to comment.