From 507e1c5df951ff62bb89491df2520cdd8b55d9ab Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 20 Sep 2018 18:55:18 +0700 Subject: [PATCH] If FileBot is called with --license with an interactive console, then force console license activation (to avoid issues when the GUI starts up but X is screwed up on some Linux systems, thus crashing on startup, failing to activate the license) --- source/net/filebot/cli/ArgumentBean.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/net/filebot/cli/ArgumentBean.java b/source/net/filebot/cli/ArgumentBean.java index 5537edf0..1b31d2e9 100644 --- a/source/net/filebot/cli/ArgumentBean.java +++ b/source/net/filebot/cli/ArgumentBean.java @@ -1,6 +1,5 @@ package net.filebot.cli; -import static java.awt.GraphicsEnvironment.*; import static java.util.Arrays.*; import static java.util.Collections.*; import static net.filebot.Logging.*; @@ -156,7 +155,7 @@ public class ArgumentBean { public List arguments = new ArrayList(); public boolean runCLI() { - return rename || getSubtitles || check || list || mediaInfo || revert || extract || script != null || (license != null && isHeadless()); + return rename || getSubtitles || check || list || mediaInfo || revert || extract || script != null || (license != null && System.console() != null); } public boolean isInteractive() {