Skip to content

Commit 256c9c5

Browse files
committed
restyle the restyler
1 parent e6afd0e commit 256c9c5

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

scripts/helpers/restyle-diff.sh

+27-27
Original file line numberDiff line numberDiff line change
@@ -40,39 +40,39 @@ cd "$CHIP_ROOT"
4040

4141
restyle-paths() {
4242
image=restyled/restyler:edge
43-
(
44-
docker run \
45-
--env LOG_LEVEL \
46-
--env LOG_DESTINATION \
47-
--env LOG_FORMAT \
48-
--env LOG_COLOR \
49-
--env HOST_DIRECTORY="$PWD" \
50-
--env UNRESTRICTED=1 \
51-
--volume "$PWD":/code \
52-
--volume /tmp:/tmp \
53-
--volume /var/run/docker.sock:/var/run/docker.sock \
54-
--entrypoint restyle-path \
55-
"$image" "$@"
56-
)
43+
44+
docker run \
45+
--env LOG_LEVEL \
46+
--env LOG_DESTINATION \
47+
--env LOG_FORMAT \
48+
--env LOG_COLOR \
49+
--env HOST_DIRECTORY="$PWD" \
50+
--env UNRESTRICTED=1 \
51+
--volume "$PWD":/code \
52+
--volume /tmp:/tmp \
53+
--volume /var/run/docker.sock:/var/run/docker.sock \
54+
--entrypoint restyle-path \
55+
"$image" "$@"
56+
5757
}
5858

5959
#This was added to be able to use xargs to call the function restyle-paths
6060
export -f restyle-paths
6161

6262
while [[ $# -gt 0 ]]; do
6363
case "$1" in
64-
-d)
65-
export LOG_LEVEL="DEBUG"
66-
shift
67-
;;
68-
-p)
69-
pull_image=1
70-
shift
71-
;;
72-
*)
73-
ref="$1"
74-
shift
75-
;;
64+
-d)
65+
export LOG_LEVEL="DEBUG"
66+
shift
67+
;;
68+
-p)
69+
pull_image=1
70+
shift
71+
;;
72+
*)
73+
ref="$1"
74+
shift
75+
;;
7676
esac
7777
done
7878

@@ -87,4 +87,4 @@ fi
8787

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

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

0 commit comments

Comments
 (0)