Skip to content

Commit

Permalink
Merge pull request #226 from xanatos1992/master
Browse files Browse the repository at this point in the history
improved ps workaround for #195
  • Loading branch information
PEZ authored Jun 14, 2019
2 parents 13379fb + ffa5487 commit 8a42c39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions calva/nrepl/jack-in.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export async function calvaJackIn() {
// Now look in our $PATH variable to check the appropriate command exists.
const cmd = isWin ? projectType.winCmd : projectType.cmd;
let executable = findInPath(cmd);
let integrated_shell = "";
let integrated_shell;

if (!executable) {
// It doesn't, do not proceed
Expand All @@ -292,7 +292,8 @@ export async function calvaJackIn() {
executable = "powershell.exe";
} else if (executable.endsWith(".bat")) {
// Current workaround for the not working powershell etc. changes to cmd.exe and later back to whaterver was set before
integrated_shell = vscode.workspace.getConfiguration("terminal.integrated.shell").get("windows");
let windowsterminalssettings = vscode.workspace.getConfiguration("terminal.integrated.shell").inspect("windows");
integrated_shell = windowsterminalssettings.workspaceFolderValue || windowsterminalssettings.workspaceValue;
if (!integrated_shell.endsWith("cmd.exe")) {
shellSettingsShouldBeChangedByUs = true;
outputChannel.appendLine("Jack-in needs to use cmd.exe to work. Allow the (temporary) switch, please.");
Expand All @@ -313,7 +314,6 @@ export async function calvaJackIn() {
state.analytics().logEvent("REPL", "JackInInterrupted", "Powershell user wont allow change of shell setting").send();
return;
}

state.cursor.set("launching", projectTypeSelection)
statusbar.update();

Expand Down

0 comments on commit 8a42c39

Please sign in to comment.