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 @@ -455,11 +455,15 @@ export const gitStackedRebase = async (
455455 ) ;
456456
457457 if ( ! wasRegularRebaseInProgress || options . viewTodoOnly ) {
458- if ( options . editor instanceof Function ) {
459- await options . editor ( { filePath : pathToStackedRebaseTodoFile } ) ;
460- } else {
461- process . stdout . write ( "\nhint: Waiting for your editor to close the file... " ) ;
462- execSyncInRepo ( `${ options . editor } ${ pathToStackedRebaseTodoFile } ` ) ;
458+ try {
459+ if ( options . editor instanceof Function ) {
460+ await options . editor ( { filePath : pathToStackedRebaseTodoFile } ) ;
461+ } else {
462+ process . stdout . write ( "\nhint: Waiting for your editor to close the file... " ) ;
463+ execSyncInRepo ( `${ options . editor } ${ pathToStackedRebaseTodoFile } ` ) ;
464+ }
465+ } catch ( _e ) {
466+ throw new Termination ( `error: There was a problem with the editor '${ options . editor } '.\n` ) ;
463467 }
464468 }
465469
You can’t perform that action at this time.
0 commit comments