Skip to content

Commit 43cd72c

Browse files
committed
Make format.sh more copy paste friendly
1 parent ae1493f commit 43cd72c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/format.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ elif which docker > /dev/null 2>&1; then
3030
--volume .:/workspace \
3131
--user "$(id -u):$(id -g)" \
3232
docker.io/swift:6.0.2 \
33-
/workspace/scripts/format.sh
33+
"/workspace/scripts/$(basename "${BASH_SOURCE[0]}")"
3434
elif which podman > /dev/null 2>&1; then
3535
podman run --rm \
3636
--volume .:/workspace \
3737
--userns=keep-id \
3838
docker.io/swift:6.0.2 \
39-
/workspace/scripts/format.sh
39+
"/workspace/scripts/$(basename "${BASH_SOURCE[0]}")"
4040
else
4141
echo "Either 'swift', 'docker' or 'podman' has to be installed to run swiftformat."
4242
exit 1

0 commit comments

Comments
 (0)