Skip to content

Commit

Permalink
Merge pull request #18 from a4lg/robust-docker-detection
Browse files Browse the repository at this point in the history
Detect Docker robustly
  • Loading branch information
rpsene authored Mar 7, 2024
2 parents b5fbf40 + dd86629 commit 0bb838e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ clean:
# Generalized rule for building any PDF
%.pdf: %.adoc
@echo "Building $* PDF"
@if command -v docker &> /dev/null ; then \
@if command -v docker >/dev/null 2>&1 ; then \
echo "Docker is available, building inside Docker container..."; \
$(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$*.pdf $*.adoc"; \
else \
echo "Docker is not available, building without Docker..."; \
$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$*.pdf $*.adoc; \
fi
fi

0 comments on commit 0bb838e

Please sign in to comment.