@@ -89,8 +89,8 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
8989
9090 const handleError = ( err : unknown ) => {
9191 showToast ( {
92- id : ` ${ err } ` ,
93- message : ` ${ err } ` ,
92+ id : err instanceof Error ? err . message : String ( err ) ,
93+ message : err instanceof Error ? err . message : String ( err ) ,
9494 color : 'danger' ,
9595 timeout : 5000 ,
9696 } ) ;
@@ -186,16 +186,16 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
186186 }
187187
188188 if ( result . type === 'uncommitted_changes' ) {
189- callbacks . promptUncommittedChanges ( ) . then ( async ( strategy ) => {
189+ void callbacks . promptUncommittedChanges ( ) . then ( async ( strategy ) => {
190190 if ( strategy === 'cancel' ) return ;
191191
192192 await invoke ( 'cmd_git_reset_changes' , { dir } ) ;
193193 return invoke < PullResult > ( 'cmd_git_pull' , { dir } ) ;
194- } ) . then ( async ( ) => { onSuccess ( ) ; await callbacks . forceSync ( ) ; } , handleError ) ;
194+ } ) . then ( async ( ) => { await onSuccess ( ) ; await callbacks . forceSync ( ) ; } , handleError ) ;
195195 }
196196
197197 if ( result . type === 'diverged' ) {
198- callbacks . promptDiverged ( result ) . then ( ( strategy ) => {
198+ void callbacks . promptDiverged ( result ) . then ( ( strategy ) => {
199199 if ( strategy === 'cancel' ) return ;
200200
201201 if ( strategy === 'force_reset' ) {
@@ -211,7 +211,7 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
211211 remote : result . remote ,
212212 branch : result . branch ,
213213 } ) ;
214- } ) . then ( async ( ) => { onSuccess ( ) ; await callbacks . forceSync ( ) ; } , handleError ) ;
214+ } ) . then ( async ( ) => { await onSuccess ( ) ; await callbacks . forceSync ( ) ; } , handleError ) ;
215215 }
216216
217217 return result ;
0 commit comments