Don't fail if build dir does not exist
Change-Id: I1613128e687d1f0b8c2868e0ab6d2f3cca833608
diff --git a/scripts/cord-in-a-box.sh b/scripts/cord-in-a-box.sh
index c37fb98..8c8435a 100755
--- a/scripts/cord-in-a-box.sh
+++ b/scripts/cord-in-a-box.sh
@@ -10,9 +10,12 @@
function cleanup_from_previous_test() {
echo "## Cleanup ##"
- echo "Destroying all Vagrant VMs"
- cd $CORDDIR/build
- sudo su $USER -c 'vagrant destroy'
+ if [ -d $CORDDIR/build ]
+ then
+ echo "Destroying all Vagrant VMs"
+ cd $CORDDIR/build
+ sudo su $USER -c 'vagrant destroy'
+ fi
echo "Removing $CORDDIR"
cd ~