[command] Fixed output + test if file exists in data-sql command

This commit is contained in:
William DURAND 2011-08-30 11:53:40 +02:00
commit 42b7937442

View file

@ -47,6 +47,10 @@ EOT
$filesystem = new Filesystem();
if (!is_dir($xmlDumpDir)) {
$filesystem->mkdir($xmlDumpDir);
}
$finder = new Finder();
foreach($finder->name('*_data.xml')->in($xmlDumpDir) as $data) {
$filesystem->copy((string) $data, $schemaDir . $data->getFilename());
@ -62,7 +66,7 @@ EOT
$filesystem->remove($data);
}
$this->summary($output, 'propel-data-sql');
$this->writeSummary($output, 'propel-data-sql');
$output->writeln(sprintf('SQL from XML data dump file is in <comment>%s</comment>.', $sqlDir));
}
}