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)

This commit is contained in:
Reinhard Pointner 2018-09-20 18:55:18 +07:00
parent 360486848f
commit 507e1c5df9
1 changed files with 1 additions and 2 deletions

View File

@ -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<String> arguments = new ArrayList<String>();
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() {