Skip to content

Commit d18be6a

Browse files
committed
Fix gui summoning browser in headless mode
1 parent 3c666ef commit d18be6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/gui/src/Main.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ object Main {
8888
}
8989
}
9090
server.start()
91-
java.awt.Desktop.getDesktop.browse(new java.net.URI(s"http://localhost:$uiPort/"))
91+
if(!java.awt.GraphicsEnvironment.isHeadless()) {
92+
java.awt.Desktop.getDesktop.browse(new java.net.URI(s"http://localhost:$uiPort/"))
93+
}
9294

9395
println("Press Enter to stop UI server.")
9496
while (Source.stdin.getLines().next().nonEmpty) {}

0 commit comments

Comments
 (0)