diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 205781dda..ad9f1fd85 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -21,6 +21,7 @@ Improvement:: Bug Fixes:: * Cell nodes do not inherit from StructuralNode (#1086) (@rahmanusta) +* Avoid throwing an exception when using AsciidoctorJ CLI and reading input from stdin (#1105) (@AlexCzar) Build Improvement:: diff --git a/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/cli/AsciidoctorInvoker.java b/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/cli/AsciidoctorInvoker.java index c234780c1..86adfd09a 100644 --- a/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/cli/AsciidoctorInvoker.java +++ b/asciidoctorj-core/src/main/java/org/asciidoctor/jruby/cli/AsciidoctorInvoker.java @@ -149,6 +149,7 @@ private void convertInput(Asciidoctor asciidoctor, Options options, List i if (inputFiles.size() == 1 && "-".equals(inputFiles.get(0).getName())) { asciidoctor.convert(readInputFromStdIn(), options); + return; } findInvalidInputFile(inputFiles)