From 179848278d396ff0c04ea0c0a3cc9ec1ec30d38f Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Thu, 29 Aug 2019 16:15:53 -0400 Subject: [PATCH] scripts: use find's -delete option to prevent 'argument too long' Signed-off-by: Alfredo Deza --- scripts/build_utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 689cd437..e9e3a4da 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -728,7 +728,7 @@ prune_stale_vagrant_vms() { shopt -s globstar # From the global workspace path, find any machine stale from other jobs - sudo find $SEARCH_PATH -type d -wholename '*/.vagrant/machines' -exec rm -rv {} + + sudo find "$SEARCH_PATH" -type d -path "*/.vagrant/machines/*" -delete # unset extended pattern globbing, to prevent messing up other functions shopt -u globstar -- 2.39.5