Skip to content

Commit

Permalink
Make ov clean work when a container, image or volume does not exist (
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkb authored Jun 20, 2024
1 parent d562f47 commit 2b8907f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ov
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ stop)
;;

clean)
docker kill openverse-dev-env
docker rm openverse-dev-env
docker rmi openverse-dev-env
docker volume rm openverse-dev-env
# Using `|| true` allows these commands to be skipped if the
# container, image or volume does not exist.
docker container stop openverse-dev-env || true
docker container rm openverse-dev-env || true
docker image rm openverse-dev-env || true
docker volume rm openverse-dev-env || true
;;

hook)
Expand Down

0 comments on commit 2b8907f

Please sign in to comment.