From bac232689d8e935a7d6ab9b2b40f1875f9adb171 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Mon, 27 Jul 2020 23:09:29 -0700 Subject: [PATCH] build: only move folder if it exists when freeing space (#24740) --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 883f5d4b3563..ab579e822444 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -336,7 +336,9 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac if [ "`uname`" == "Darwin" ]; then sudo mkdir -p $TMPDIR/del-target tmpify() { - sudo mv $1 $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1) + if [ -d "$1" ]; then + sudo mv $1 $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1) + fi } tmpify /Library/Developer/CoreSimulator tmpify $(xcode-select -p)/Platforms/AppleTVOS.platform