Skip to content

Commit

Permalink
Pr/reorder docker podman check (qmk#19561)
Browse files Browse the repository at this point in the history
  • Loading branch information
Renegade-Master authored and omikronik committed Jan 22, 2023
1 parent eaff583 commit 3bd75ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions util/docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ if [ $# -gt 1 ]; then
fi

# Allow $RUNTIME to be overridden by the user as an environment variable
# Else check if either docker or podman exit and set them as runtime
# Else check if either podman or docker exit and set them as runtime
# if none are found error out
if [ -z "$RUNTIME" ]; then
if command -v docker >/dev/null 2>&1; then
RUNTIME="docker"
elif command -v podman >/dev/null 2>&1; then
if command -v podman >/dev/null 2>&1; then
RUNTIME="podman"
elif command -v docker >/dev/null 2>&1; then
RUNTIME="docker"
else
errcho "Error: no compatible container runtime found."
errcho "Either podman or docker are required."
Expand Down
8 changes: 4 additions & 4 deletions util/docker_cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ for arg; do
done

# Allow $RUNTIME to be overridden by the user as an environment variable
# Else check if either docker or podman exit and set them as runtime
# Else check if either podman or docker exit and set them as runtime
# if none are found error out
if [ -z "$RUNTIME" ]; then
if command -v docker >/dev/null 2>&1; then
RUNTIME="docker"
elif command -v podman >/dev/null 2>&1; then
if command -v podman >/dev/null 2>&1; then
RUNTIME="podman"
elif command -v docker >/dev/null 2>&1; then
RUNTIME="docker"
else
errcho "Error: no compatible container runtime found."
errcho "Either podman or docker are required."
Expand Down

0 comments on commit 3bd75ea

Please sign in to comment.