Skip to content

Commit 5d7cdf6

Browse files
authored
Fix cell executor selection logic so bash cell execution works (#826)
* Fix cell executor selection logic so bash cell execution works * Add changelog entry
1 parent ca04e1b commit 5d7cdf6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

apps/vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Fixed Copilot completions in `.qmd` documents (<https://github.com/quarto-dev/quarto/pull/887>).
66
- Fixed a bug where the `autoDetectColorScheme` setting could cause equation previews to have a dark text on dark background and vice versa (<https://github.com/quarto-dev/quarto/pull/864>).
7+
- Fix a regression where bash cell execution does not work (<https://github.com/quarto-dev/quarto/pull/826>).
78

89
## 1.128.0 (Release on 2026-01-08)
910

apps/vscode/src/host/executors.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ const csharpCellExecutor: VSCodeCellExecutor = {
153153
const bashCellExecutor: VSCodeCellExecutor = {
154154
language: "bash",
155155
execute: async (blocks: string[]) => {
156-
const terminal = window.activeTerminal || window.createTerminal();
156+
// todo: this should probably check that the terminal isn't an interactive terminal for languages
157+
// other than R as well...
158+
const terminal = window.activeTerminal && window.activeTerminal?.name !== 'R Interactive' ?
159+
window.activeTerminal : window.createTerminal();
160+
157161
terminal.show();
158162
terminal.sendText(blocks.join("\n"));
159163
},
@@ -283,7 +287,7 @@ export async function ensureRequiredExtension(
283287
}
284288
}
285289
} else {
286-
return false;
290+
return true;
287291
}
288292
}
289293

0 commit comments

Comments
 (0)