Skip to content

Commit

Permalink
repair broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Green committed Sep 28, 2015
1 parent bfbe8f1 commit 18646ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions bin/sync
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ class App {

$input->bind($command->getDefinition());

if($input->getOption('help'))
if($input->hasOption('help') && $input->getOption('help'))
{
$this->showUsage($command);

return 0;
}

Expand All @@ -67,7 +68,7 @@ class App {

$this->showUsage($command);

return $e->getCode();
return 1;
}

try
Expand All @@ -80,12 +81,14 @@ class App {

$this->output->writeln('<comment>' . $e->getTraceAsString() . '</comment>');

return $e->getCode();
return $e->getCode() ?: 1;
}

return 0;
}

}

return (new App())->run(new SyncCommand());
$code = (new App())->run(new SyncCommand());

exit($code);
Binary file modified db-sync.phar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Command/SyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->input = $input;

if(($config = $this->input->getOption('config')) && is_file($config)){
if(($config = $this->input->getOption('config-file')) && is_file($config)){

$this->output->writeln("Reading ini file '$config'");
foreach(parse_ini_file($config) as $name => $value){
Expand Down

0 comments on commit 18646ff

Please sign in to comment.