From e51bbf479becc97a9cadbff9d6d3b9f3374821f8 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Sat, 24 Apr 2021 02:28:41 +0200 Subject: [PATCH] Correctly augment path to toplevel git folder --- industrial_ci/src/tests/source_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/industrial_ci/src/tests/source_tests.sh b/industrial_ci/src/tests/source_tests.sh index f7569e4f4..a0800ecea 100644 --- a/industrial_ci/src/tests/source_tests.sh +++ b/industrial_ci/src/tests/source_tests.sh @@ -48,7 +48,7 @@ function run_clang_tidy { pushd "$src_dir" > /dev/null || true if git fetch -q origin "$CLANG_TIDY_BASE_REF" 2> /dev/null; then # git might fail, e.g. operating on catkin_tools_prebuild # Filter for changed files, using sed to augment full path again (which git strips away) - mapfile -t files < <(git diff --name-only --diff-filter=MA FETCH_HEAD..HEAD -- "${files[@]}" | sed "s#^#$PWD/#") + mapfile -t files < <(git diff --name-only --diff-filter=MA FETCH_HEAD..HEAD -- "${files[@]}" | sed "s#^#$(git rev-parse --show-toplevel)/#") fi popd > /dev/null || true fi