File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -346,11 +346,15 @@ export const gitStackedRebase = async (
346346 ) ;
347347
348348 if ( ! wasRegularRebaseInProgress || options . viewTodoOnly ) {
349- if ( options . editor instanceof Function ) {
350- await options . editor ( { filePath : pathToStackedRebaseTodoFile } ) ;
351- } else {
352- process . stdout . write ( "\nhint: Waiting for your editor to close the file... " ) ;
353- execSyncInRepo ( `${ options . editor } ${ pathToStackedRebaseTodoFile } ` ) ;
349+ try {
350+ if ( options . editor instanceof Function ) {
351+ await options . editor ( { filePath : pathToStackedRebaseTodoFile } ) ;
352+ } else {
353+ process . stdout . write ( "\nhint: Waiting for your editor to close the file... " ) ;
354+ execSyncInRepo ( `${ options . editor } ${ pathToStackedRebaseTodoFile } ` ) ;
355+ }
356+ } catch ( _e ) {
357+ throw new Termination ( `error: There was a problem with the editor '${ options . editor } '.\n` ) ;
354358 }
355359 }
356360
You can’t perform that action at this time.
0 commit comments