/** * {@inheritdoc} * * @see PlatformCommand::getCurrentEnvironment() */ protected function execute(InputInterface $input, OutputInterface $output) { $this->stdOut->writeln("<info>Syncing Platform.sh environment database to local</info>"); // @todo this isn't as robust as getCurrentEnvironment(). $git = $this->getHelper('shell'); $currentBranch = $git->execute(['git', 'symbolic-ref', '--short', 'HEAD'], Platform::repoDir()); $remoteAlias = '@' . Platform::projectName() . '.' . $currentBranch; $localAlias = '@' . Platform::projectName() . '._local'; // @todo squeeze this into the ShellHelper arguments somehow. exec("drush {$remoteAlias} sql-dump --gzip | gzip -cd | drush {$localAlias} sqlc"); // $this->stdOut->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); // $shell = new ShellHelper($this->stdOut); // $shell->execute([ // "drush $remoteAlias sql-dump --gzip | gzip -cd | drush $localAlias sqlc" // ], null, true, false); }