Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option --version Fails #19

Open
znerd opened this issue Oct 12, 2018 · 1 comment
Open

Option --version Fails #19

znerd opened this issue Oct 12, 2018 · 1 comment

Comments

@znerd
Copy link

znerd commented Oct 12, 2018

Steps to reproduce:

  1. docker run --rm asciidoctor/docker-asciidoctor asciidoctor-confluence --version
  2. echo $?

Expected results:

  1. Version is printed in step 1.
  2. No error is printed in step 1.
  3. Exit code 0 in step 2.

Actual results:

  1. OK: Version is indeed printed in step 1.
  2. NOK: After the version output comes an error.
  3. NOK Exit code is 1.

Output:

$ docker run --rm asciidoctor/docker-asciidoctor asciidoctor-confluence --version
Unable to find image 'asciidoctor/docker-asciidoctor:latest' locally
latest: Pulling from asciidoctor/docker-asciidoctor
c67f3896b22c: Pull complete
94e0a328a61c: Pull complete
4eb7dbe1cbfa: Pull complete
5267350f46f2: Pull complete
23aa78cbccb9: Pull complete
Digest: sha256:d1e01a3d819e4c55514a6499c3c3af6a4b9f7fbc814430d8d803b91f6c819391
Status: Downloaded newer image for asciidoctor/docker-asciidoctor:latest
Asciidoctor-confluence v0.0.2
Asciidoctor 1.5.7.1 [https://asciidoctor.org]
Runtime Environment (ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux-musl]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

/usr/lib/ruby/gems/2.4.0/gems/asciidoctor-confluence-0.0.2/bin/asciidoctor-confluence:7:in `exit': no implicit conversion from nil to integer (TypeError)
	from /usr/lib/ruby/gems/2.4.0/gems/asciidoctor-confluence-0.0.2/bin/asciidoctor-confluence:7:in `<top (required)>'
	from /usr/bin/asciidoctor-confluence:23:in `load'
	from /usr/bin/asciidoctor-confluence:23:in `<main>'
$ echo $?
1
@znerd
Copy link
Author

znerd commented Oct 12, 2018

The problem might be in this piece of code in invoker.rb:

def self.invoke_helper_or_version(args)
  helpers = %w(-h --help -V --version)
  args.size == 1 && helpers.include?(args[0])
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant