desktopmerge
bunsenstraat 1 year ago
parent d5b97bc8f7
commit 5a0d0453b1
  1. 16
      apps/remixdesktop/src/plugins/xtermPlugin.ts

@ -115,7 +115,10 @@ class XtermPluginClient extends ElectronBasePluginClient {
async getShells(): Promise<string[]> {
if (os.platform() === 'win32') {
const bash = await findExecutable('bash.exe')
let bash = await findExecutable('bash.exe')
if(bash.length === 0) {
bash = await findExecutable('bash.exe', undefined, [process.env['ProgramFiles'] + '\\Git\\usr\\bin'])
}
if (bash) {
const shells = ['powershell.exe', 'cmd.exe', ...bash]
// filter out duplicates
@ -150,17 +153,6 @@ class XtermPluginClient extends ElectronBasePluginClient {
})
this.terminals[ptyProcess.pid] = ptyProcess
setTimeout(() => {
if(parsedEnv) {
this.sendData('default shell\n', ptyProcess.pid)
this.sendData(defaultShell + '\n', ptyProcess.pid)
this.sendData('parsed' + '\n', ptyProcess.pid)
this.sendData(JSON.stringify(parsedEnv) + '\n', ptyProcess.pid)
}
this.sendData(JSON.stringify(env), ptyProcess.pid)
}, 2000)
return ptyProcess.pid
}

Loading…
Cancel
Save