bleary
Member
"relay" CLI command should not attempt to launch a browser window when headless
I think this patch ought to achieve the intended result.
I think this patch ought to achieve the intended result.
Code:
--- RelayLoader.java (revision 10904)
+++ RelayLoader.java (working copy)
@@ -46,6 +46,8 @@
import net.sourceforge.kolmafia.utilities.PauseObject;
+import net.sourceforge.kolmafia.StaticEntity;
+
public class RelayLoader
extends Thread
{
@@ -124,7 +126,8 @@
pauser.pause( 200 );
}
- BrowserLauncher.openURL( "http://127.0.0.1:" + RelayServer.getPort() + this.location );
+ if (!StaticEntity.isHeadless())
+ BrowserLauncher.openURL( "http://127.0.0.1:" + RelayServer.getPort() + this.location );
}
else
{