Skip to content

Commit 3c12f1c

Browse files
committed
Don't show a success message on a failed docker build
1 parent 38766d3 commit 3c12f1c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

docker.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ case "$1" in
2020
# Check if Nix is installed and try to build the Docker container with Nix.
2121
# If Nix is not installed or the build failed due to any reason, try to
2222
# build with Docker.
23-
( which nix &>/dev/null && nix-build nix/docker.nix && docker load < result ) ||
24-
docker build . --tag diffdetective-demo:1.0.0 || echo "Failed to build the docker container." && echo "Docker container successfully built."
23+
(
24+
( which nix &>/dev/null && nix-build nix/docker.nix && docker load < result ) ||
25+
docker build . --tag diffdetective-demo:1.0.0
26+
) && echo "Docker container successfully built." || echo "Failed to build the docker container."
2527
;;
2628
demo)
2729
docker run --rm --net=host --volume="$HOME/.Xauthority:/home/user/.Xauthority:rw" -e _JAVA_AWT_WM_NONREPARENTING="$_JAVA_AWT_WM_NONREPARENTING" -e DISPLAY="${DISPLAY:-:0}" diffdetective-demo:1.0.0

0 commit comments

Comments
 (0)