Skip to content

Commit 5a902ba

Browse files
authored
Merge pull request #107 from morozov/issue-106
Return FALSE in case of invalid arguments passed to a command
2 parents df9139a + 41c1214 commit 5a902ba

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
.hhconfig
2+
.onion
3+
build/
14
composer.lock
2-
vendor/
35
src/PHPBrew/
4-
build/
5-
.onion
6-
.hhconfig
6+
vendor/
7+
tmp/

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
},
2323
"require-dev": {
2424
"corneltek/phpunit-testmore": "dev-master",
25-
"satooshi/php-coveralls": "^1"
25+
"satooshi/php-coveralls": "^1",
26+
"phpunit/phpunit": "^5.7"
2627
},
2728
"license": "MIT",
2829
"authors": [

src/Application.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,8 @@ public function run(Array $argv)
407407
}
408408
$currentCmd->finish();
409409
$this->finish();
410-
return true;
410+
411+
return $return !== false;
411412
}
412413

413414
/**

src/CommandBase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,8 @@ public function executeWrapper(array $args)
814814

815815
if ($valid === FALSE) {
816816
$this->logger->error($message ?: "Invalid argument $arg");
817-
return;
817+
818+
return false;
818819
}
819820
}
820821
}

0 commit comments

Comments
 (0)