3 namespace Drush\Commands\generate\Helper;
5 use DrupalCodeGenerator\Helper\OutputHandler as BaseOutputHandler;
6 use Symfony\Component\Console\Output\OutputInterface;
7 use Webmozart\PathUtil\Path;
10 * Output printer form generators.
12 class OutputHandler extends BaseOutputHandler
18 public function printSummary(OutputInterface $output, array $dumped_files)
20 /** @var \DrupalCodeGenerator\Command\GeneratorInterface $command */
21 $command = $this->getHelperSet()->getCommand();
22 $directory = $command->getDirectory();
24 // Make the paths relative to Drupal root directory.
25 foreach ($dumped_files as &$file) {
26 $file = Path::join($directory, $file);
30 if (false && defined('DRUPAL_ROOT') && $dumped_files) {
31 // @todo Below code is forking new process well but current process is not shutting down fully.
32 $exec = drush_get_editor();
33 $exec = str_replace('%s', drush_escapeshellarg(Path::makeAbsolute($dumped_files[0], DRUPAL_ROOT)), $exec);
35 proc_close(proc_open($exec . ' 2> ' . drush_bit_bucket() . ' &', [], $pipes));
37 parent::printSummary($output, $dumped_files);