Skip to content

Commit

Permalink
Add support for podman
Browse files Browse the repository at this point in the history
Helps to test #331
  • Loading branch information
raxod502 committed Jan 22, 2025
1 parent 049325e commit bac1fed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions scripts/docker-run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ set -euo pipefail

repo="$(git rev-parse --show-toplevel)"

docker=(docker)
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
docker=(sudo -E "${docker[@]}")
if [[ -z "${USE_PODMAN:-}" ]]; then
docker=(docker)
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
docker=(sudo -E "${docker[@]}")
fi
else
docker=(podman)
fi

it=()
Expand Down
10 changes: 7 additions & 3 deletions test/formatters/build-image.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ fi

cd "$(dirname "$0")"

docker=(docker)
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
docker=(sudo -E "${docker[@]}")
if [[ -z "${USE_PODMAN:-}" ]]; then
docker=(docker)
if [[ "$OSTYPE" != darwin* ]] && [[ "$EUID" != 0 ]]; then
docker=(sudo -E "${docker[@]}")
fi
else
docker=(podman)
fi

args=()
Expand Down

0 comments on commit bac1fed

Please sign in to comment.