Skip to content

Commit

Permalink
Merge pull request #1179 from pantheon-systems/change/robo_runner
Browse files Browse the repository at this point in the history
Using Robo Runner
  • Loading branch information
TeslaDethray committed Sep 9, 2016
2 parents b588e6b + 223eda4 commit fa9281a
Show file tree
Hide file tree
Showing 11 changed files with 389 additions and 203 deletions.
33 changes: 30 additions & 3 deletions bin/terminus.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,36 @@
#!/usr/bin/env php
<?php

require __DIR__ . '/../vendor/autoload.php';
$phar_path = \Phar::running(true);
if ($phar_path) {
include_once "$phar_path/vendor/autoload.php";
} else {
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
include_once __DIR__ . '/../vendor/autoload.php';
} elseif (file_exists(__DIR__ . '/../../autoload.php')) {
include_once __DIR__ . '/../../autoload.php';
}
}

use League\Container\Container;
use Pantheon\Terminus\Config;
use Pantheon\Terminus\Runner;
use Pantheon\Terminus\Terminus;
use Robo\Robo;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;

$runner = new Runner();
$runner->run();
// Initializing the Terminus application
$config = new Config();
$application = new Terminus('Terminus', $config->get('version'), $config);

// Configuring the dependency-injection container
$container = new Container();
$input = new ArgvInput($_SERVER['argv']);
$output = new ConsoleOutput();
Robo::configureContainer($container, $input, $output, $application);

// Running Terminus
$runner = new Runner($container);
$status_code = $runner->run($input, $output);
exit($status_code);

0 comments on commit fa9281a

Please sign in to comment.