Skip to content

Commit

Permalink
Launch Solargraph in a login shell (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
PyvesB committed Nov 14, 2020
1 parent 5734c83 commit a0797c7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 {
Expand Down Expand Up @@ -54,7 +56,10 @@ public void start() throws IOException {
}

private static List<String> 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() {
Expand Down

0 comments on commit a0797c7

Please sign in to comment.