Skip to content

Commit e1a1d17

Browse files
committed
fix: terminal commands in powershell
1 parent 28c7e4c commit e1a1d17

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/launcher/terminal.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,20 @@ export class MarimoTerminal implements IMarimoTerminal {
127127
}
128128

129129
try {
130-
this.terminal.sendText(cmd);
130+
// Check if we're in PowerShell and format command accordingly
131+
const isPowerShell = this.terminal.name
132+
?.toLowerCase()
133+
.includes("powershell");
134+
135+
if (isPowerShell) {
136+
this.logger.info(
137+
"Detected PowerShell terminal, running command with &",
138+
);
139+
}
140+
141+
const formattedCmd = isPowerShell ? `& ${cmd}` : cmd;
142+
143+
this.terminal.sendText(formattedCmd);
131144

132145
if (Config.showTerminal) {
133146
this.terminal.show(true);

0 commit comments

Comments
 (0)