@@ -1314,16 +1314,15 @@ export class IpcMain {
13141314 sshArgs . push ( `cd '${ config . remotePath . replace ( / ' / g, "'\\''" ) } ' && exec $SHELL` ) ;
13151315 }
13161316
1317- const isSSH = config . type === "ssh" ;
1318- const logPrefix = isSSH ? "SSH terminal" : "terminal" ;
1317+ const logPrefix = config . type === "ssh" ? "SSH terminal" : "terminal" ;
13191318
13201319 if ( process . platform === "darwin" ) {
13211320 // macOS - try Ghostty first, fallback to Terminal.app
13221321 const terminal = await this . findAvailableCommand ( [ "ghostty" , "terminal" ] ) ;
13231322 if ( terminal === "ghostty" ) {
13241323 const cmd = "open" ;
13251324 let args : string [ ] ;
1326- if ( isSSH && sshArgs ) {
1325+ if ( config . type === "ssh" && sshArgs ) {
13271326 // Ghostty: Use --command flag to run SSH
13281327 // Build the full SSH command as a single string
13291328 const sshCommand = [ "ssh" , ...sshArgs ] . join ( " " ) ;
@@ -1341,9 +1340,9 @@ export class IpcMain {
13411340 child . unref ( ) ;
13421341 } else {
13431342 // Terminal.app
1344- const cmd = isSSH ? "osascript" : "open" ;
1343+ const cmd = config . type === "ssh" ? "osascript" : "open" ;
13451344 let args : string [ ] ;
1346- if ( isSSH && sshArgs ) {
1345+ if ( config . type === "ssh" && sshArgs ) {
13471346 // Terminal.app: Use osascript with proper AppleScript structure
13481347 // Properly escape single quotes in args before wrapping in quotes
13491348 const sshCommand = `ssh ${ sshArgs
@@ -1375,7 +1374,7 @@ export class IpcMain {
13751374 // Windows
13761375 const cmd = "cmd" ;
13771376 let args : string [ ] ;
1378- if ( isSSH && sshArgs ) {
1377+ if ( config . type === "ssh" && sshArgs ) {
13791378 // Windows - use cmd to start ssh
13801379 args = [ "/c" , "start" , "cmd" , "/K" , "ssh" , ...sshArgs ] ;
13811380 } else {
@@ -1393,7 +1392,7 @@ export class IpcMain {
13931392 // Linux - try terminal emulators in order of preference
13941393 let terminals : Array < { cmd : string ; args : string [ ] ; cwd ?: string } > ;
13951394
1396- if ( isSSH && sshArgs ) {
1395+ if ( config . type === "ssh" && sshArgs ) {
13971396 // x-terminal-emulator is checked first as it respects user's system-wide preference
13981397 terminals = [
13991398 { cmd : "x-terminal-emulator" , args : [ "-e" , "ssh" , ...sshArgs ] } ,
0 commit comments