Skip to content

Commit 4aa5c03

Browse files
committed
Fix cell executor selection logic so bash cell execution works
1 parent 012d457 commit 4aa5c03

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

apps/vscode/src/host/executors.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,11 @@ const csharpCellExecutor: VSCodeCellExecutor = {
148148
const bashCellExecutor: VSCodeCellExecutor = {
149149
language: "bash",
150150
execute: async (blocks: string[]) => {
151-
const terminal = window.activeTerminal || window.createTerminal();
151+
// todo: this should probably check that the terminal isn't an interactive terminal for languages
152+
// other than R as well...
153+
const terminal = window.activeTerminal && window.activeTerminal?.name !== 'R Interactive' ?
154+
window.activeTerminal : window.createTerminal();
155+
152156
terminal.show();
153157
terminal.sendText(blocks.join("\n"));
154158
},
@@ -278,7 +282,7 @@ export async function ensureRequiredExtension(
278282
}
279283
}
280284
} else {
281-
return false;
285+
return true;
282286
}
283287
}
284288

0 commit comments

Comments
 (0)