From 036525d11ec80b9e396b80c97796a2b55f26a1db Mon Sep 17 00:00:00 2001 From: jidicula Date: Fri, 14 Jan 2022 22:14:14 -0500 Subject: [PATCH] fix: Dynamically mount working directory to container --- check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check.sh b/check.sh index 1b5a3a2..70b9f2c 100755 --- a/check.sh +++ b/check.sh @@ -20,7 +20,7 @@ format_diff() { local filepath="$1" # Invoke clang-format with dry run and formatting error output - local_format="$(docker run -i -v "$(pwd)":/workdir -w /workdir ghcr.io/jidicula/clang-format:"$CLANG_FORMAT_VERSION" -n --Werror --style=file --fallback-style="$FALLBACK_STYLE" "/workdir/${filepath}")" + local_format="$(docker run -it -v "$(pwd)":"$(pwd)" -w "$(pwd)" ghcr.io/jidicula/clang-format:"$CLANG_FORMAT_VERSION" -n --Werror --style=file --fallback-style="$FALLBACK_STYLE" "${filepath}")" local format_status="$?" if [[ "${format_status}" -ne 0 ]]; then ls