File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -1114,17 +1114,12 @@ export class MI2 extends EventEmitter implements IDebugger {
1114
1114
return strCode ;
1115
1115
}
1116
1116
1117
- isTerminalInstalled ( terminalCommand ) : boolean {
1117
+ isTerminalInstalled ( terminalCommand : string ) : boolean {
1118
1118
try {
1119
- const command = `command -v ${ terminalCommand } >/dev/null 2>/dev/null` ;
1120
- const xterm_process = ChildProcess . spawn ( command , {
1121
- detached : true ,
1122
- stdio : 'ignore' ,
1123
- } ) ;
1124
- xterm_process . unref ( ) ;
1125
- return true ;
1119
+ ChildProcess . execSync ( `command -v ${ terminalCommand } ` ) ;
1120
+ return true ;
1126
1121
} catch ( error ) {
1127
- return false ;
1122
+ return false ;
1128
1123
}
1129
1124
}
1130
1125
@@ -1220,10 +1215,10 @@ export class MI2 extends EventEmitter implements IDebugger {
1220
1215
this . createXtermTerminal ( sleepVal , target ) ;
1221
1216
} else if ( this . isTerminalInstalled ( "gnome-terminal" ) ) {
1222
1217
this . createGNOMETerminal ( sleepVal , target ) ;
1223
- } else if ( this . isTerminalInstalled ( "konsole" ) ) {
1224
- this . createKDETerminal ( sleepVal , target ) ;
1225
1218
} else if ( this . isTerminalInstalled ( "xfce4-terminal" ) ) {
1226
1219
this . createXFCETerminal ( sleepVal , target ) ;
1220
+ } else if ( this . isTerminalInstalled ( "konsole" ) ) {
1221
+ this . createKDETerminal ( sleepVal , target ) ;
1227
1222
}
1228
1223
}
1229
1224
} else {
You can’t perform that action at this time.
0 commit comments