Improved some commands

This commit is contained in:
William DURAND 2011-04-13 22:27:07 +02:00
commit ed1d9ad267
5 changed files with 38 additions and 2 deletions

View file

@ -47,5 +47,18 @@ EOT
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->callPhing('diff');
foreach (explode("\n", $this->buffer) as $line) {
if (false !== strpos($line, '[propel-sql-diff]')) {
$arr = preg_split('#\[propel-sql-diff\] #', $line);
$info = $arr[1];
if ('"' === $info[0]) {
$info = sprintf('<info>%s</info>', $info);
}
$output->writeln($info);
}
}
}
}