diff --git a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/server/SolargraphStreamConnectionProvider.java b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/server/SolargraphStreamConnectionProvider.java index 3b111af..2e5e14d 100644 --- a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/server/SolargraphStreamConnectionProvider.java +++ b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/server/SolargraphStreamConnectionProvider.java @@ -18,6 +18,7 @@ import java.io.File; import java.io.IOException; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; @@ -27,6 +28,7 @@ import org.eclipse.ui.dialogs.PreferencesUtil; import io.github.pyvesb.eclipse_solargraph.preferences.PreferencePage; +import io.github.pyvesb.eclipse_solargraph.utils.CommandHelper; import io.github.pyvesb.eclipse_solargraph.utils.GemHelper; public class SolargraphStreamConnectionProvider extends ProcessStreamConnectionProvider { @@ -54,7 +56,10 @@ public void start() throws IOException { } private static List getSolargraphCommand() { - return new File(GEM_PATH.getValue()).exists() ? Arrays.asList(GEM_PATH.getValue(), "stdio") : Arrays.asList(); + if (new File(GEM_PATH.getValue()).exists()) { + return Arrays.asList(CommandHelper.getPlatformCommand("\"" + GEM_PATH.getValue() + "\" stdio")); + } + return Collections.emptyList(); } private void displayNotFoundWarning() {