From d6e5ccf74540ffb531928f237933d03ec1633dd8 Mon Sep 17 00:00:00 2001 From: crschnick Date: Wed, 28 Jan 2026 09:31:08 +0000 Subject: [PATCH] Various fixes --- .../io/xpipe/app/core/check/AppShellChecker.java | 13 ++++++++++--- .../src/main/java/io/xpipe/beacon/BeaconConfig.java | 6 +++++- dist/changelog/21.0.md | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/core/check/AppShellChecker.java b/app/src/main/java/io/xpipe/app/core/check/AppShellChecker.java index c8f0c5887..22a476ccc 100644 --- a/app/src/main/java/io/xpipe/app/core/check/AppShellChecker.java +++ b/app/src/main/java/io/xpipe/app/core/check/AppShellChecker.java @@ -1,5 +1,6 @@ package io.xpipe.app.core.check; +import io.xpipe.app.core.AppCache; import io.xpipe.app.core.AppNames; import io.xpipe.app.ext.ProcessControlProvider; import io.xpipe.app.issue.ErrorAction; @@ -37,7 +38,7 @@ public abstract class AppShellChecker { var attemptFallback = shouldAttemptFallbackForProcessStartFail() || !originalErr.get().isProcessSpawnIssue(); if (!attemptFallback) { - // Sometimes we don't to fall back + // Sometimes we don't want to fall back // The local shell init will fail terminally if it still does not work return; } @@ -100,18 +101,24 @@ public abstract class AppShellChecker { } private String formatMessage(String output) { + var isDefaultShell = ProcessControlProvider.get() + .getAvailableLocalDialects() + .getFirst() + .equals(ProcessControlProvider.get().getEffectiveLocalDialect()); + var fallback = isDefaultShell ? AppNames.ofCurrent().getName() + " will now attempt to fall back to another shell." : ""; return """ Shell self-test failed for %s: %s This indicates that something is seriously wrong and certain shell functionality will not work as expected. Some features like the terminal launcher have to create shell scripts for your external terminal emulator to launch. - %s will now attempt to fall back to another shell. + %s """ .formatted( LocalShell.getDialect().getDisplayName(), modifyOutput(output), - AppNames.ofCurrent().getName()); + fallback) + .strip(); } protected abstract boolean fallBackInstantly(); diff --git a/beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java b/beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java index 9b8c95a0f..ecd990533 100644 --- a/beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java +++ b/beacon/src/main/java/io/xpipe/beacon/BeaconConfig.java @@ -65,7 +65,11 @@ public class BeaconConfig { name, "beacon-auth"); } else { - return Path.of(System.getProperty("java.io.tmpdir"), staging ? "xpipe-ptb" : "xpipe", "beacon-auth"); + var path = Path.of(System.getProperty("java.io.tmpdir"), staging ? "xpipe-ptb" : "xpipe", "beacon-auth"); + if (path.startsWith(Path.of("C:\\Windows"))) { + path = Path.of(System.getenv("LOCALAPPDATA")).resolve("TEMP"); + } + return path; } } } diff --git a/dist/changelog/21.0.md b/dist/changelog/21.0.md index 3d59c06a7..938e56242 100644 --- a/dist/changelog/21.0.md +++ b/dist/changelog/21.0.md @@ -39,6 +39,7 @@ The scripting system has been completely reworked with the goal of becoming simp ## Other +- The RAM usage has been improved a lot - Replace various old icons with more modern variants - Add option to open AWS web dashboard from XPipe - Improve fallback behaviour when local shell failed to start