Skip to content

Commit

Permalink
Reenable remote (#55)
Browse files Browse the repository at this point in the history
* Update drupal console instructions

* Include drupal-finder in composer

* Remove drupal-finder in composer

* Re-enable remote execution commands

* Re-enable remote execution commands
  • Loading branch information
enzolutions authored Nov 18, 2016
1 parent 9d212a3 commit fe21c70
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions bin/drupal.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

use DrupalFinder\DrupalFinder;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Drupal\Console\Bootstrap\DrupalConsoleCore;
use Drupal\Console\Utils\ArgvInputReader;
use Drupal\Console\Style\DrupalStyle;
use Drupal\Console\LauncherApplication;
use Drupal\Console\Style\DrupalStyle;
use Drupal\Console\Utils\ArgvInputReader;
use Drupal\Console\Utils\Remote;

set_time_limit(0);

Expand All @@ -28,8 +30,9 @@

$argvInputReader = new ArgvInputReader();

$configuration = $container->get('console.configuration_manager')
->getConfiguration();
$configurationManager = $container->get('console.configuration_manager');

$configuration = $configurationManager->getConfiguration();

$translator = $container->get('console.translator_manager');

Expand All @@ -45,15 +48,32 @@

$argvInputReader->setOptionsAsArgv();

$output = new ConsoleOutput();

if ($argvInputReader->get('remote', false)) {

$input = new ArgvInput();

$remote = $container->get('console.remote');
$commandName = $argvInputReader->get('command', false);

$remoteResult = $remote->executeCommand(
$commandName,
$target,
$targetConfig,
$input->__toString(),
$configurationManager->getHomeDirectory()
);

$output->writeln($remoteResult);
/*
* Execute command via ssh
* Relocate remote execution to this project
*/
exit(0);
}

$output = new ConsoleOutput();

$input = new ArrayInput([]);
$io = new DrupalStyle($input, $output);

Expand Down

0 comments on commit fe21c70

Please sign in to comment.