/**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $this->config->load($this->argument('conversion'));
     $command = $this->commandStringBuilder->build($this->config);
     $outputPath = $this->config->outputPath();
     if (file_exists($outputPath)) {
         @unlink($outputPath);
     }
     if ($this->config->debug()) {
         $this->output->block('[DEBUG] Running command: ' . $command);
     }
     if (empty(shell_exec("which mysqldump"))) {
         throw new MissingDependency('mysqldump is not available');
     }
     if (is_executable($this->config->converterExecutable()) === false) {
         $process = new Process('chmod +x ' . $this->config->converterExecutable());
         $process->run();
     }
     $process = new Process($command);
     $outputFilter = $this->outputFilter;
     $process->mustRun(function ($type, $output) use($outputFilter) {
         // some things are expected, so we'll hide that
         // to avoid misleading warnings/errors
         $output = $outputFilter->filter($output);
         if ($output != null) {
             if (Process::ERR === $type) {
                 echo 'ERR > ' . $output;
             } else {
                 echo 'OUT > ' . $output;
             }
         }
     });
     $this->output->success('Dump created at ' . $outputPath);
 }