Small bug fixes

This commit is contained in:
Christopher Schnick 2022-12-15 21:52:29 +01:00
parent 5d849cc048
commit 22619224c5
2 changed files with 6 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import io.xpipe.beacon.exchange.StopExchange;
import io.xpipe.core.impl.FileNames;
import io.xpipe.core.impl.LocalStore;
import io.xpipe.core.process.ShellProcessControl;
import io.xpipe.core.process.ShellTypes;
import io.xpipe.core.util.XPipeInstallation;
import lombok.experimental.UtilityClass;
@ -43,7 +44,7 @@ public class BeaconServer {
// Tell daemon that we launched from an external tool
var command = "\"" + daemonExecutable + "\" --external "
+ (BeaconConfig.getDaemonArguments() != null ? BeaconConfig.getDaemonArguments() : "");
Process process = Runtime.getRuntime().exec(command);
Process process = Runtime.getRuntime().exec(ShellTypes.getPlatformDefault().executeCommandWithShell(command));
printDaemonOutput(process, command);
return process;
}

View file

@ -13,6 +13,10 @@ public class XPipeInstallation {
public static String getInstallationBasePathForCLI(ShellProcessControl p, String cliExecutable) throws Exception {
var defaultInstallation = getDefaultInstallationBasePath(p, true);
if (cliExecutable == null) {
return defaultInstallation;
}
if (p.getOsType().equals(OsType.LINUX) && cliExecutable.equals("/usr/bin/xpipe")) {
return defaultInstallation;
}