Skip to content

Commit

Permalink
AbstractGateway: show UI when launching headless
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ctrueden committed Jan 10, 2017
1 parent 31d19be commit 8afe5da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/scijava/AbstractGateway.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ public void launch(final String... args) {
final int mainCount = main().execMains();

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

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

0 comments on commit 8afe5da

Please sign in to comment.