Skip to content

Commit 7534071

Browse files
cydgitweitzman
authored andcommitted
Fix config:export not deleting collections (#3690)
1 parent e9f276a commit 7534071

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Drupal/Commands/config/ConfigExportCommands.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ public function doExport($options, $destination_dir)
135135
}
136136
// Only delete .yml files, and not .htaccess or .git.
137137
$target_storage->deleteAll();
138+
139+
// Also delete collections.
140+
foreach ($target_storage->getAllCollectionNames() as $collection_name) {
141+
$target_collection = $target_storage->createCollection($collection_name);
142+
$target_collection->deleteAll();
143+
}
138144
}
139145

140146
// Write all .yml files.

0 commit comments

Comments
 (0)