build: only move folder if it exists when freeing space (#24740)

This commit is contained in:
Samuel Attard 2020-07-27 23:09:29 -07:00 committed by GitHub
parent 76e3ee6fe6
commit bac232689d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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