diff --git a/components/bio-formats-tools/src/loci/formats/tools/ImageInfo.java b/components/bio-formats-tools/src/loci/formats/tools/ImageInfo.java index 9a2e93f564b..a42968e5de7 100644 --- a/components/bio-formats-tools/src/loci/formats/tools/ImageInfo.java +++ b/components/bio-formats-tools/src/loci/formats/tools/ImageInfo.java @@ -1153,12 +1153,11 @@ public static void main(String[] args) throws Exception { } } scanner.close(); + System.exit(exitCode); } else { if (!new ImageInfo().testRead(args)) System.exit(1); } - - System.exit(exitCode); } }