1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-04 16:35:08 -05:00

on Linux, if there is no interactive console, then we are likely called by a background service running as a different user

This commit is contained in:
Reinhard Pointner 2018-07-17 17:54:36 +07:00
parent 61a856da84
commit 6f14f62748

View File

@ -42,7 +42,9 @@ public class ArgumentProcessor {
log.severe("License Error: " + e.getMessage());
if (LICENSE.isFile()) {
printStegosaurus("Please purchase a FileBot License:", getPurchaseURL());
if (isLinuxApp()) {
// on Linux, if there is no interactive console, then we are likely called by a background service running as a different user
if (isLinuxApp() && System.console() == null) {
log.severe(format("FileBot requires a valid license. Please run `sudo -H -u %s filebot --license *.psm` to install your FileBot license.", System.getProperty("user.name")));
} else {
log.severe(format("FileBot requires a valid license. Please run `filebot --license *.psm` install your FileBot license."));