File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -122,25 +122,26 @@ export class VscodeProvider {
122122 proc : cp . ChildProcess ,
123123 fn : ( message : ipc . VscodeMessage ) => message is T ,
124124 ) : Promise < T > {
125- return new Promise ( ( resolve , _reject ) => {
125+ return new Promise ( ( resolve , reject ) => {
126126 const cleanup = ( ) => {
127- proc . off ( "error" , reject )
127+ proc . off ( "error" , onError )
128128 proc . off ( "exit" , onExit )
129129 proc . off ( "message" , onMessage )
130130 clearTimeout ( timeout )
131131 }
132132
133133 const timeout = setTimeout ( ( ) => {
134134 cleanup ( )
135- _reject ( new Error ( "timed out" ) )
135+ reject ( new Error ( "timed out" ) )
136136 } , this . timeoutInterval )
137137
138- const reject = ( error : Error ) => {
138+ const onError = ( error : Error ) => {
139139 cleanup ( )
140- _reject ( error )
140+ reject ( error )
141141 }
142142
143143 const onExit = ( code : number | null ) => {
144+ cleanup ( )
144145 reject ( new Error ( `VS Code exited unexpectedly with code ${ code } ` ) )
145146 }
146147
@@ -153,7 +154,7 @@ export class VscodeProvider {
153154 }
154155
155156 proc . on ( "message" , onMessage )
156- proc . on ( "error" , reject )
157+ proc . on ( "error" , onError )
157158 proc . on ( "exit" , onExit )
158159 } )
159160 }
You can’t perform that action at this time.
0 commit comments