baev / allure-cli-depricated

Allure Command Line Tool
Other
20 stars 7 forks source link

Erroneous invocation returns exit code 0 #28

Closed etki closed 9 years ago

etki commented 9 years ago

Hi. It seems that Allure CLI always returns exit code 0, even when invalid parameters are specified. It would probably be good to report any unrecoverable errors with exit code other than zero.

Used version: 2.3 Reproducing:

etki@vmint:/tmp > /usr/bin/allure generate --report-version 121.4 -- dummy-dir/
ru.yandex.qatools.clay.AetherException: Can't resolve given artifact ru.yandex.qatools.allure:allure-report-data:jar:121.4
etki@vmint:/tmp > echo $?
0
etki@vmint:/tmp > /usr/bin/allure generate --report-path /tmp/report --
Required parameters are missing: Results patterns
etki@vmint:/tmp > echo $?
0
vania-pooh commented 9 years ago

Need to insert System.exit(1) near the following line: https://github.com/allure-framework/allure-cli/blob/master/src/main/java/ru/yandex/qatools/allure/AllureCLI.java#L34 PR wanted.

etki commented 9 years ago

@vania-pooh It lies a little bit deeper (though still should be simple enough to modify): AllureCommand.java#L37

I'll look into it when i'll have enough time

vania-pooh commented 9 years ago

Fixed in #30.