mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 02:53:51 +08:00
Use current user for docker version of clang-format
If `clang-format` with the correct usage does not exist on the machine, the `clang_format_all.sh` script is executed in a docker image. Since a `--user` is not provided, the script is executed with the wrong user, which gives wrong user for formatted files. This commit fixes this by providing the user id and group id of the current user when using the docker version of `clang-format`.
This commit is contained in:
parent
d88be2772b
commit
b7aacb6737
@ -272,7 +272,7 @@ if (NOT CLANG_FORMAT)
|
||||
else ()
|
||||
message(STATUS "Using docker based clang-format")
|
||||
add_custom_target(format
|
||||
COMMAND docker run --rm -it -v ${PROJECT_SOURCE_DIR}:/timescaledb timescaledev/postgres-dev-clang:clang7-pg11.1 /timescaledb/scripts/clang_format_all.sh
|
||||
COMMAND docker run --rm -it --user=`id -u`:`id -g` --volume=${PROJECT_SOURCE_DIR}:/timescaledb timescaledev/postgres-dev-clang:clang7-pg11.1 /timescaledb/scripts/clang_format_all.sh
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
|
Loading…
x
Reference in New Issue
Block a user