Skip to content

Commit

Permalink
Only add to backups array if element matches. (#2664)
Browse files Browse the repository at this point in the history
  • Loading branch information
kporras07 authored Jan 15, 2025
1 parent 85e4c50 commit d53ff89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Commands/Backup/RestoreCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ protected function doGetBackups(string $site_env, array $elements, array $option
foreach ($elements as $element) {
$options['element'] = $element;
try {
$backups[$element] = $this->getBackup($site_env, $options);
$backup = $this->getBackup($site_env, $options);
if ($backup->get('type') === $element) {
$backups[$element] = $backup;
}
} catch (TerminusNotFoundException $e) {
continue;
}
Expand Down

0 comments on commit d53ff89

Please sign in to comment.