Commit fa73abe4 authored by Chandan Singh's avatar Chandan Singh Committed by Tristan Van Berkom

contrib/bst-here: Remove redundant create_volume_if_not_exists() method

This method doesn't really do anything as this is already the default
behavior of `docker volume create` so remove it and always call
`docker volume create` directly. This command will always print the name
of the volume on STDOUT which is not very interesting so silence that.
(If it errors out for some reason, that output will go to STDERR so the
user should still be able to see that.)
parent ba018efe
Pipeline #23812991 passed with stages
in 28 minutes and 44 seconds
......@@ -86,16 +86,9 @@ done
test "$OPTIND" -gt 1 &&
shift $(( OPTIND - 1 ))
create_volume_if_not_exists () {
if ! docker volume inspect "$1" >/dev/null 2>&1
docker volume create --name "$1"
for vol in buildstream-cache buildstream-config
create_volume_if_not_exists "$vol"
docker volume create "$vol" >/dev/null
BST_HERE_PS1="\[\033[01;34m\]\w\[\033[00m\]> "
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment