From b74b6d8bcb1b643cc736f62c198d38e52b00430e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Fri, 1 Nov 2024 08:50:36 +0000 Subject: [PATCH] ImageInfo: only call System.exit in batch mode The ability to run showinf in batch mode introduced in Bio-Formats 8 has caused some regression with the interactivity of the utility when opening a single image without the -nopix option as the System.exit call immediately closes the viewer. This commit addresses the issue by only invoking it when multiple input are passed. --- .../bio-formats-tools/src/loci/formats/tools/ImageInfo.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } }