We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2414325 commit 1e30218Copy full SHA for 1e30218
1 file changed
src/main/kotlin/app/morphe/MorpheLauncher.kt
@@ -6,12 +6,19 @@
6
package app.morphe
7
8
import app.morphe.library.logging.Logger
9
+import java.awt.GraphicsEnvironment
10
11
fun main(args: Array<String>) {
- if (args.isEmpty()) {
12
+ if (args.isEmpty() && !GraphicsEnvironment.isHeadless()) {
13
app.morphe.gui.launchGui(args)
14
} else {
15
Logger.setDefault()
16
+
17
+ if (GraphicsEnvironment.isHeadless()){
18
+ val logger = java.util.logging.Logger.getLogger("app.morphe.MorpheLauncher")
19
+ logger.info("Running in Headless environment, falling back to CLI mode.")
20
+ }
21
22
picocli.CommandLine(app.morphe.cli.command.MainCommand)
23
.execute(*args)
24
.let(System::exit)
0 commit comments