File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11/*---------------------------------------------------------
22 * Copyright (C) Microsoft Corporation. All rights reserved.
33 *--------------------------------------------------------*/
4-
54import * as os from 'os' ;
65import * as fs from 'fs' ;
76import * as path from 'path' ;
@@ -160,6 +159,12 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
160159 cliCommand . tnsProcess . stderr . on ( 'data' , data => { Services . logger ( ) . error ( data . toString ( ) , Tags . FrontendMessage ) ; } ) ;
161160 cliCommand . tnsProcess . on ( 'close' , ( code , signal ) => {
162161 Services . logger ( ) . error ( `[NSDebugAdapter] The tns command finished its execution with code ${ code } .` , Tags . FrontendMessage ) ;
162+
163+ // Sometimes we execute "tns debug android --start" and the process finishes
164+ // which is totally fine. If there's an error we need to Terminate the session.
165+ if ( code > 0 ) {
166+ this . fireEvent ( new TerminatedEvent ( ) ) ;
167+ }
163168 } ) ;
164169 }
165170
You can’t perform that action at this time.
0 commit comments