Skip to content

Commit

Permalink
fix vendor dir detection
Browse files Browse the repository at this point in the history
  • Loading branch information
back-2-95 committed Jun 24, 2021
1 parent c91131d commit bd11434
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Sql/GdprSqlTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ public function dumpCmd($table_selection) {

$drupal_finder = new DrupalFinder();
$drupal_finder->locateRoot(DRUPAL_ROOT);
$vendor_dir = $drupal_finder->getVendorDir();

if ($vendor = $drupal_finder->getVendorDir() && isset($this->driverOptions['dump_command'])) {
if ($vendor_dir && isset($this->driverOptions['dump_command'])) {
// Replace default dump command with the GDPR compliant one.
$cmd = str_replace($this->driverOptions['dump_command'], $vendor . '/bin/mysqldump', $cmd);
$cmd = str_replace($this->driverOptions['dump_command'], $vendor_dir . '/bin/mysqldump', $cmd);
}

return $cmd;
Expand Down

0 comments on commit bd11434

Please sign in to comment.