1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-22 17:18:37 +00:00

add filepath test

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2017-01-22 13:19:46 +01:00
parent 8303b037fb
commit a607b7a9c0
2 changed files with 19 additions and 2 deletions

View file

@ -23,7 +23,7 @@ class ExportCommand extends ContainerAwareCommand
'User from which to export entries'
)
->addArgument(
'filename',
'filepath',
InputArgument::OPTIONAL,
'Path of the exported file'
)
@ -46,7 +46,7 @@ class ExportCommand extends ContainerAwareCommand
$output->write(sprintf('Exporting %d entrie(s) for user « <comment>%s</comment> »... ', count($entries), $user->getUserName()));
$filePath = $input->getArgument('filename');
$filePath = $input->getArgument('filepath');
if (!$filePath) {
$filePath = $this->getContainer()->getParameter('kernel.root_dir') . '/../' . sprintf('%s-export', $user->getUsername());
}