Skip to content

Commit

Permalink
Better error when you have no backups available from Acquia cloud yet
Browse files Browse the repository at this point in the history
  • Loading branch information
becw committed May 14, 2019
1 parent 71b0522 commit 7bc313c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/TheBuild/Acquia/GetLatestBackupTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 7bc313c

Please sign in to comment.