From d6d5c8162ff9263676a487e22ebd5232786c1f52 Mon Sep 17 00:00:00 2001 From: crschnick Date: Fri, 28 Jun 2024 18:44:40 +0000 Subject: [PATCH] Small fixes --- .../main/java/io/xpipe/app/browser/BrowserStatusBarComp.java | 2 +- app/src/main/java/io/xpipe/app/util/ScriptHelper.java | 3 +-- beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java | 5 +++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java index 33823a8de..7a3342a80 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserStatusBarComp.java @@ -90,7 +90,7 @@ public class BrowserStatusBarComp extends SimpleComp { return p.getName(); } }); - var progressComp = new LabelComp(text).styleClass("progress").apply(struc -> struc.get().setAlignment(Pos.CENTER_LEFT)).prefWidth(250); + var progressComp = new LabelComp(text).styleClass("progress").apply(struc -> struc.get().setAlignment(Pos.CENTER_LEFT)).prefWidth(180); return progressComp; } diff --git a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java index 4c5b30f7f..16917dc37 100644 --- a/app/src/main/java/io/xpipe/app/util/ScriptHelper.java +++ b/app/src/main/java/io/xpipe/app/util/ScriptHelper.java @@ -70,8 +70,7 @@ public class ScriptHelper { content += nl + postInit.stream().flatMap(s -> s.lines()).collect(Collectors.joining(nl)) + nl; if (exit) { - // Assign exit code 0 to prevent terminals from doing their own pause error handling for failed commands - content += nl + t.getNormalExitCommand(); + content += nl + t.getPassthroughExitCommand(); } return createExecScript(t, processControl, new FilePath(t.initFileName(processControl)), content); diff --git a/beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java b/beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java index 00f783de8..2d910a988 100644 --- a/beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java +++ b/beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java @@ -44,6 +44,11 @@ public class BeaconConfig { } public static int getUsedPort() { + var beaconPort = System.getenv("BEACON_PORT"); + if (beaconPort != null && !beaconPort.isBlank()) { + return Integer.parseInt(beaconPort); + } + if (System.getProperty(BEACON_PORT_PROP) != null) { return Integer.parseInt(System.getProperty(BEACON_PORT_PROP)); }