File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/databricks-vscode/src/cli Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ class CustomSyncTerminal implements Pseudoterminal {
8383 private writeEmitter = new EventEmitter < string > ( ) ;
8484 onDidWrite : Event < string > = this . writeEmitter . event ;
8585
86+ private closeEmitter = new EventEmitter < void > ( ) ;
87+ onDidClose : Event < void > = this . closeEmitter . event ;
88+
8689 private syncProcess : ChildProcess | undefined ;
8790 private bricksSyncParser : BricksSyncParser ;
8891
@@ -159,6 +162,14 @@ class CustomSyncTerminal implements Pseudoterminal {
159162 this . syncProcess . stdout . on ( "data" , ( data ) => {
160163 this . bricksSyncParser . process ( data . toString ( ) ) ;
161164 } ) ;
165+
166+ this . syncProcess . on ( "close" , ( code ) => {
167+ if ( code !== 0 ) {
168+ this . syncStateCallback ( "ERROR" ) ;
169+ // terminate the vscode terminal task
170+ this . closeEmitter . fire ( ) ;
171+ }
172+ } ) ;
162173 }
163174}
164175
You can’t perform that action at this time.
0 commit comments