diff --git a/deployer/tasks/setup.php b/deployer/tasks/setup.php index 9cb0d27..0ab361d 100644 --- a/deployer/tasks/setup.php +++ b/deployer/tasks/setup.php @@ -208,7 +208,10 @@ private function copyDatabase(): void // export source database onHost($this->source, function () use ($path) { - cd('{{current_path}}'); + if (!$this->source instanceof Localhost) { + cd('{{current_path}}'); + } + run('{{bin/php}} {{bin/console}} db:connection-options | xargs {{bin/mysqldump}} > ' . escapeshellarg($path)); if ($this->source instanceof Localhost) {