Skip to content

Commit ebc2486

Browse files
author
Yosif Yosifov
committed
Terminate the session if the exit code of the TNS process is error
1 parent 561c3b1 commit ebc2486

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/debug-adapter/webKitDebugAdapter.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,12 @@ export class WebKitDebugAdapter implements DebugProtocol.IDebugAdapter {
159159
cliCommand.tnsProcess.stderr.on('data', data => { Services.logger().error(data.toString(), Tags.FrontendMessage); });
160160
cliCommand.tnsProcess.on('close', (code, signal) => {
161161
Services.logger().error(`[NSDebugAdapter] The tns command finished its execution with code ${code}.`, Tags.FrontendMessage);
162-
this.fireEvent(new TerminatedEvent());
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

0 commit comments

Comments
 (0)