Skip to content

Commit 8ad0e5e

Browse files
committed
Add a check
1 parent 59dc560 commit 8ad0e5e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

play.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ if [[ -z "$(vagrant plugin list | grep -o 'vagrant-disksize')" ]]; then
4646
vagrant plugin install vagrant-disksize
4747
fi
4848

49-
CACHED_BOX="$HOME/.cache/sqlflow/ubuntu-bionic64.box"
50-
if [[ -f $CACHED_BOX ]]; then
51-
echo "Found and use cached box $CACHED_BOX"
52-
vagrant box add ubuntu/bionic64 $CACHED_BOX
49+
if [[ -z "$(vagrant box list | grep 'ubuntu/bionic64')" ]]; then
50+
CACHED_BOX="$HOME/.cache/sqlflow/ubuntu-bionic64.box"
51+
if [[ -f $CACHED_BOX ]]; then
52+
echo "Found and use cached box $CACHED_BOX"
53+
vagrant box add ubuntu/bionic64 $CACHED_BOX
54+
fi
5355
fi
5456

5557
echo "Start and provision the playgound VM ..."

0 commit comments

Comments
 (0)