Skip to content

Commit 7dd2032

Browse files
authored
Add podman support for format.sh
1 parent 2d25dc5 commit 7dd2032

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/format.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ elif which docker > /dev/null 2>&1; then
3131
--user "$(id -u):$(id -g)" \
3232
swift:6.0.2 \
3333
/workspace/scripts/format.sh
34+
elif which podman > /dev/null 2>&1; then
35+
podman run --rm \
36+
--volume .:/workspace \
37+
--userns=keep-id \
38+
docker.io/swift:6.0.2 \
39+
/workspace/scripts/format.sh
3440
else
35-
echo "Either 'swift' or 'docker' has to be installed to run swiftformat as an SPM plugin."
41+
echo "Either 'swift', 'docker' or 'podman' has to be installed to run swiftformat."
3642
exit 1
3743
fi

0 commit comments

Comments
 (0)