Skip to content

Commit

Permalink
restyle the restyler
Browse files Browse the repository at this point in the history
  • Loading branch information
Alami-Amine committed Jul 31, 2024
1 parent e6afd0e commit eb9385a
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions scripts/helpers/restyle-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ cd "$CHIP_ROOT"

restyle-paths() {
image=restyled/restyler:edge
(
docker run \
--env LOG_LEVEL \
--env LOG_DESTINATION \
--env LOG_FORMAT \
--env LOG_COLOR \
--env HOST_DIRECTORY="$PWD" \
--env UNRESTRICTED=1 \
--volume "$PWD":/code \
--volume /tmp:/tmp \
--volume /var/run/docker.sock:/var/run/docker.sock \
--entrypoint restyle-path \
"$image" "$@"
)

docker run \
--env LOG_LEVEL \
--env LOG_DESTINATION \
--env LOG_FORMAT \
--env LOG_COLOR \
--env HOST_DIRECTORY="$PWD" \
--env UNRESTRICTED=1 \
--volume "$PWD":/code \
--volume /tmp:/tmp \
--volume /var/run/docker.sock:/var/run/docker.sock \
--entrypoint restyle-path \
"$image" "$@"

}

#This was added to be able to use xargs to call the function restyle-paths
Expand Down Expand Up @@ -87,4 +87,4 @@ fi

paths=$(git diff --ignore-submodules --name-only --merge-base "$ref")

echo "$paths" | xargs -n $MAX_ARGS bash -c 'restyle-paths "$@"'
echo "$paths" | xargs -n "$MAX_ARGS" bash -c 'restyle-paths "$@"'

0 comments on commit eb9385a

Please sign in to comment.