diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2015-05-17 02:45:40 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2015-05-17 02:46:12 -0600 |
| commit | 725eca80c6e19c6fefd4b02c122b5d7fb49b4f05 (patch) | |
| tree | fc6e4b9bac1b19b3e254009d832aa2199d135b0d | |
| parent | af5a41785d8c042beac606d56107dbfe3fd0c13d (diff) | |
abort cli if option parsing returns exit code
| -rwxr-xr-x | bin/asciidoctor-pdf | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/asciidoctor-pdf b/bin/asciidoctor-pdf index 7547656e..a10876c4 100755 --- a/bin/asciidoctor-pdf +++ b/bin/asciidoctor-pdf @@ -5,8 +5,9 @@ require 'asciidoctor/cli' options = Asciidoctor::Cli::Options.new backend: 'pdf', header_footer: true # FIXME This is a really bizarre API. Please make me simpler. -if (options.parse! ARGV) == 0 - exit 0 +result = options.parse! ARGV +if Integer === result + exit result else invoker = Asciidoctor::Cli::Invoker.new options GC.start |
