Fix bug in beacon server launch (again)

This commit is contained in:
Christopher Schnick 2022-12-16 21:45:07 +01:00
parent e0d9b7cff2
commit ec10f3dcab

View file

@ -42,12 +42,14 @@ public class BeaconServer {
} }
public static Process start(String installationBase) throws Exception { public static Process start(String installationBase) throws Exception {
var daemonExecutable = getDaemonDebugExecutable(installationBase); String command;
// Tell daemon that we launched from an external tool if (!BeaconConfig.launchDaemonInDebugMode()) {
var command = BeaconConfig.launchDaemonInDebugMode() command = XPipeInstallation.createExternalAsyncLaunchCommand(installationBase, BeaconConfig.getDaemonArguments());
? XPipeInstallation.createExternalAsyncLaunchCommand( } else {
installationBase, BeaconConfig.getDaemonArguments()) command = XPipeInstallation.createExternalLaunchCommand(
: XPipeInstallation.createExternalLaunchCommand(getDaemonDebugExecutable(installationBase), BeaconConfig.getDaemonArguments()); getDaemonDebugExecutable(installationBase), BeaconConfig.getDaemonArguments());
}
Process process = Process process =
Runtime.getRuntime().exec(ShellTypes.getPlatformDefault().executeCommandWithShell(command)); Runtime.getRuntime().exec(ShellTypes.getPlatformDefault().executeCommandWithShell(command));
printDaemonOutput(process, command); printDaemonOutput(process, command);
@ -117,8 +119,7 @@ public class BeaconServer {
return FileNames.join( return FileNames.join(
installationBase, XPipeInstallation.getDaemonDebugAttachScriptPath(pc.getOsType())); installationBase, XPipeInstallation.getDaemonDebugAttachScriptPath(pc.getOsType()));
} else { } else {
return FileNames.join( return FileNames.join(installationBase, XPipeInstallation.getDaemonDebugScriptPath(pc.getOsType()));
installationBase, XPipeInstallation.getDaemonDebugScriptPath(pc.getOsType()));
} }
} }
} }