Skip to content

Commit 8afe5da

Browse files
committed
AbstractGateway: show UI when launching headless
Now that we have a dedicated headless UI plugin, we should "show" it even when running headless. This will no longer hose the system, but rather ensure the headless UI behaves as desired.
1 parent 31d19be commit 8afe5da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/scijava/AbstractGateway.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public void launch(final String... args) {
9898
final int mainCount = main().execMains();
9999

100100
// display the user interface (NB: does not block)
101-
if (mainCount == 0 && !ui().isHeadless()) ui().showUI();
101+
// NB: When running headless, the HeadlessUI will be used.
102+
if (mainCount == 0) ui().showUI();
102103

103104
if (ui().isHeadless()) {
104105
// now that CLI processing/execution is done, we can shut down

0 commit comments

Comments
 (0)