This commit is contained in:
Louis Lam
2023-10-29 15:25:52 +08:00
parent 7d1da2ad99
commit e67d08b7b3
19 changed files with 483 additions and 104 deletions

View File

@ -47,6 +47,10 @@ export class Terminal {
}
public start() {
if (this._ptyProcess) {
return;
}
this._ptyProcess = pty.spawn(this.file, this.args, {
name: this.name,
cwd: this.cwd,
@ -139,10 +143,12 @@ export class MainTerminal extends InteractiveTerminal {
constructor(server : DockgeServer, name : string, cwd : string = "./") {
let shell;
if (commandExistsSync("pwsh")) {
shell = "pwsh";
} else if (os.platform() === "win32") {
shell = "powershell.exe";
if (os.platform() === "win32") {
if (commandExistsSync("pwsh.exe")) {
shell = "pwsh.exe";
} else {
shell = "powershell.exe";
}
} else {
shell = "bash";
}