From 71b0522ece91866a9f17001530a9710a1d40ba49 Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 14 May 2019 13:14:54 -0500 Subject: [PATCH 1/2] Make sure the Acquia backups dir exists. --- targets/acquia.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/targets/acquia.xml b/targets/acquia.xml index 83708c82..6cd52d95 100644 --- a/targets/acquia.xml +++ b/targets/acquia.xml @@ -25,6 +25,7 @@ + From 7bc313ca31f512b0d5352fe3056cf2d7eb18623a Mon Sep 17 00:00:00 2001 From: Bec White Date: Tue, 14 May 2019 13:21:20 -0500 Subject: [PATCH 2/2] Better error when you have no backups available from Acquia cloud yet --- src/TheBuild/Acquia/GetLatestBackupTask.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/TheBuild/Acquia/GetLatestBackupTask.php b/src/TheBuild/Acquia/GetLatestBackupTask.php index ecde8bb2..96f2a0b3 100644 --- a/src/TheBuild/Acquia/GetLatestBackupTask.php +++ b/src/TheBuild/Acquia/GetLatestBackupTask.php @@ -251,6 +251,10 @@ protected function getBackupRecords($file) { return $backups; } + elseif (count($backups) === 0) { + // The site might not have been backed up yet. + throw new BuildException('No Acquia Cloud backups found: ' . $file->getCanonicalPath()); + } } throw new BuildException('Acquia Cloud backup records could not be loaded from JSON: ' . $file->getCanonicalPath()); }