File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
packages/cli-kit/src/public/node Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ describe('initializeRepository()', () => {
252252
253253 // Then
254254 expect ( simpleGit ) . toHaveBeenCalledOnce ( )
255- expect ( simpleGit ) . toHaveBeenCalledWith ( '/tmp/git-repo' )
255+ expect ( simpleGit ) . toHaveBeenCalledWith ( { baseDir : '/tmp/git-repo' } )
256256
257257 expect ( mockedInit ) . toHaveBeenCalledOnce ( )
258258 expect ( mockedCheckout ) . toHaveBeenCalledOnce ( )
@@ -617,7 +617,7 @@ describe('removeGitRemote()', () => {
617617 await git . removeGitRemote ( directory , remoteName )
618618
619619 // Then
620- expect ( simpleGit ) . toHaveBeenCalledWith ( directory )
620+ expect ( simpleGit ) . toHaveBeenCalledWith ( { baseDir : directory } )
621621 expect ( mockedGetRemotes ) . toHaveBeenCalled ( )
622622 expect ( mockedRemoveRemote ) . toHaveBeenCalledWith ( remoteName )
623623 } )
@@ -635,7 +635,7 @@ describe('removeGitRemote()', () => {
635635 await git . removeGitRemote ( directory , remoteName )
636636
637637 // Then
638- expect ( simpleGit ) . toHaveBeenCalledWith ( directory )
638+ expect ( simpleGit ) . toHaveBeenCalledWith ( { baseDir : directory } )
639639 expect ( mockedGetRemotes ) . toHaveBeenCalled ( )
640640 expect ( mockedRemoveRemote ) . not . toHaveBeenCalled ( )
641641 } )
Original file line number Diff line number Diff line change @@ -381,9 +381,9 @@ async function withGit<T>({
381381} ) : Promise < T > {
382382 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
383383 // @ts -ignore
384- const git = git ( { baseDir : directory } )
384+ const repo = git ( { baseDir : directory } )
385385 try {
386- return await callback ( git )
386+ return await callback ( repo )
387387 } catch ( err ) {
388388 if ( err instanceof Error ) {
389389 const abortError = new AbortError ( err . message )
You can’t perform that action at this time.
0 commit comments