Skip to content

Commit

Permalink
Merge pull request #345 from mdjaman
Browse files Browse the repository at this point in the history
fix excludecollections in mongodump
  • Loading branch information
sebastianfeldmann authored Aug 12, 2023
2 parents e0edf04 + 4198f64 commit 48f98cc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Cli/Executable/Mongodump.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,17 @@ protected function createCommandLine() : CommandLine
}
}

$cmd->addOptionIfNotEmpty('--excludeCollection', $this->excludeCollections);
if (count($this->excludeCollections)) {
foreach ($this->excludeCollections as $col) {
$cmd->addOption('--excludeCollection', $col, ' ');
}
}

if (count($this->excludeCollectionsWithPrefix)) {
foreach ($this->excludeCollectionsWithPrefix as $col) {
$cmd->addOption('--excludeCollectionWithPrefix', $col, ' ');
}
}
$cmd->addOptionIfNotEmpty('--excludeCollectionWithPrefix', $this->excludeCollectionsWithPrefix);

return $process;
Expand Down

0 comments on commit 48f98cc

Please sign in to comment.