Skip to content

Commit

Permalink
Fix to handle missing styles due to upstream “bc” fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-redfern committed Dec 2, 2020
1 parent 35a4db9 commit f4dd394
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader
}

use Symfony\Component\Console\Application;
use Symfony\Component\Console\Formatter\OutputFormatter;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;
Expand All @@ -31,14 +32,17 @@ if (file_exists($env)) {
(new Dotenv())->loadEnv($env);
}

$formatter = new OutputFormatter(false, [
'ok' => new OutputFormatterStyle('white', 'green', ['bold']),
'err' => new OutputFormatterStyle('white', 'red', ['bold']),
'step' => new OutputFormatterStyle('white', 'blue', ['bold']),
'q' => new OutputFormatterStyle('white', 'cyan', ['bold']),
'warn' => new OutputFormatterStyle('white', 'yellow', ['bold']),
'i' => new OutputFormatterStyle('white', 'magenta', ['bold']),
]);

$input = new ArgvInput();
$output = new ConsoleOutput();
$output->getFormatter()->setStyle('ok', new OutputFormatterStyle('white', 'green', ['bold']));
$output->getFormatter()->setStyle('err', new OutputFormatterStyle('white', 'red', ['bold']));
$output->getFormatter()->setStyle('step', new OutputFormatterStyle('white', 'blue', ['bold']));
$output->getFormatter()->setStyle('q', new OutputFormatterStyle('white', 'cyan', ['bold']));
$output->getFormatter()->setStyle('warn', new OutputFormatterStyle('white', 'yellow', ['bold']));
$output->getFormatter()->setStyle('i', new OutputFormatterStyle('white', 'magenta', ['bold']));
$output = new ConsoleOutput(ConsoleOutput::VERBOSITY_NORMAL, null, $formatter);

$app = new Application('Sync-It with Mutagen', '1.0.0');
$commands = [
Expand Down

0 comments on commit f4dd394

Please sign in to comment.