From b124566d9533d5d939338d479f2e7a7c714f3f16 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Wed, 4 Sep 2019 08:53:00 -0400 Subject: [PATCH] scripts: use a loop instead of globbing directly Signed-off-by: Alfredo Deza --- scripts/build_utils.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 5903badb..de0e6a74 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -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 -- 2.39.5