Skip to content

Commit

Permalink
use only relativer path to db on docker
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jul 29, 2022
1 parent 0367cf4 commit 37e3083
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cpp_linter/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,9 @@ def run_clang_tidy(
cmds.append(f"-checks={checks}")
if database:
cmds.append("-p")
if not os.path.isabs(database):
database = os.path.normpath(
os.path.join(RUNNER_WORKSPACE, repo_root, database)
)
if IS_USING_DOCKER and os.path.isabs(database):
repo_root += os.sep # temp non-op to make use of the arg
database = database.replace(GITHUB_WORKSPACE + os.sep, "")
cmds.append(database)
if lines_changed_only:
ranges = "diff_chunks" if lines_changed_only == 1 else "lines_added"
Expand Down

0 comments on commit 37e3083

Please sign in to comment.