From ff5941249d81dd0027c1ea131ea1b15ae69f545c Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 13 Mar 2025 04:28:04 +0000 Subject: [PATCH] Fix vscode remote detection on macos --- app/src/main/java/io/xpipe/app/util/LocalShellCache.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/util/LocalShellCache.java b/app/src/main/java/io/xpipe/app/util/LocalShellCache.java index d5255a10b..7b804b871 100644 --- a/app/src/main/java/io/xpipe/app/util/LocalShellCache.java +++ b/app/src/main/java/io/xpipe/app/util/LocalShellCache.java @@ -1,7 +1,6 @@ package io.xpipe.app.util; import io.xpipe.app.issue.ErrorEvent; -import io.xpipe.app.prefs.ExternalApplicationType; import io.xpipe.app.prefs.ExternalEditorType; import io.xpipe.core.process.OsType; import io.xpipe.core.process.ShellControl; @@ -15,7 +14,7 @@ public class LocalShellCache extends ShellControlCache { super(shellControl); } - public Optional getVsCodePath() { + public Optional getVsCodeCliPath() { if (!has("codePath")) { try { var app = @@ -25,8 +24,8 @@ public class LocalShellCache extends ShellControlCache { .map(s -> Path.of(s)); } case OsType.MacOs macOs -> { - yield new ExternalApplicationType.MacApplication( - "app.vscode", "Visual Studio Code") {}.findApp(); + yield CommandSupport.findProgram(getShellControl(), "code") + .map(s -> Path.of(s)); } case OsType.Windows windows -> { yield ExternalEditorType.VSCODE_WINDOWS.findExecutable();