]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts: use a loop instead of globbing directly 1388/head
authorAlfredo Deza <adeza@redhat.com>
Wed, 4 Sep 2019 12:53:00 +0000 (08:53 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 4 Sep 2019 12:53:00 +0000 (08:53 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
scripts/build_utils.sh

index 5903badb2073b24aae731000a1fb27bab12d550d..de0e6a74c52edef54226862a4d38900528a71213 100644 (file)
@@ -728,7 +728,11 @@ prune_stale_vagrant_vms() {
     shopt -s globstar
 
     # From the global workspace path, find any machine stale from other jobs
-    sudo find $SEARCH_PATH -path "*/.vagrant/machines/*" -delete
+    # A loop is required here to avoid having problems when matching too many
+    # paths in $SEARCH_PATH
+    for path in $SEARCH_PATH; do
+        sudo find $path -path "*/.vagrant/machines/*" -delete
+    done
 
     # unset extended pattern globbing, to prevent messing up other functions
     shopt -u globstar