From 986f6dd2b8520b28dc36de4ed8cf0f66271c9bdf Mon Sep 17 00:00:00 2001 From: crschnick Date: Sat, 19 Jul 2025 05:47:27 +0000 Subject: [PATCH] Agent rc file fix for linux [stage] --- .../xpipe/ext/base/identity/SshIdentityStateManager.java | 8 ++------ version | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ext/base/src/main/java/io/xpipe/ext/base/identity/SshIdentityStateManager.java b/ext/base/src/main/java/io/xpipe/ext/base/identity/SshIdentityStateManager.java index 75bbc9c9a..8967aaa6a 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/identity/SshIdentityStateManager.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/identity/SshIdentityStateManager.java @@ -212,17 +212,13 @@ public class SshIdentityStateManager { stopWindowsAgents(false, true, true); sc.executeSimpleBooleanCommand("ssh-agent start"); checkLocalAgentIdentities(null); - } else if (sc.getOsType() == OsType.MACOS) { - // On macOS, we prefer the shell variable compared to any global env variable + } else if (sc.getOsType() == OsType.LINUX || sc.getOsType() == OsType.MACOS) { + // On Linux and macOS, we prefer the shell variable compared to any global env variable // as that one is set by default and might not be the right one // This happens for example with homebrew ssh var shellVariable = sc.view().getEnvironmentVariable("SSH_AUTH_SOCK"); var socketEnvVariable = shellVariable.isEmpty() ? System.getenv("SSH_AUTH_SOCK") : shellVariable; checkLocalAgentIdentities(socketEnvVariable); - } else { - // On Linux, there is no automatically set env variable, so we can always prefer the env variable - var socketEnvVariable = System.getenv("SSH_AUTH_SOCK"); - checkLocalAgentIdentities(socketEnvVariable); } runningAgent = RunningAgent.SSH_AGENT; diff --git a/version b/version index b1fb133d7..a0b97da2f 100644 --- a/version +++ b/version @@ -1 +1 @@ -17.0-23 +17.0-24