File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -767,11 +767,14 @@ export class Model implements IBranchProtectionProviderRegistry, IRemoteSourcePu
767
767
768
768
private async getRepositoryExact ( repoPath : string ) : Promise < Repository | undefined > {
769
769
const repoPathCanonical = await fs . promises . realpath ( repoPath , { encoding : 'utf8' } ) ;
770
- const openRepository = this . openRepositories . find ( async r => {
771
- const rootPathCanonical = await fs . promises . realpath ( r . repository . root , { encoding : 'utf8' } ) ;
772
- return pathEquals ( rootPathCanonical , repoPathCanonical ) ;
773
- } ) ;
774
- return openRepository ?. repository ;
770
+
771
+ for ( const openRepository of this . openRepositories ) {
772
+ const rootPathCanonical = await fs . promises . realpath ( openRepository . repository . root , { encoding : 'utf8' } ) ;
773
+ if ( pathEquals ( rootPathCanonical , repoPathCanonical ) ) {
774
+ return openRepository . repository ;
775
+ }
776
+ }
777
+ return undefined ;
775
778
}
776
779
777
780
private getOpenRepository ( repository : Repository ) : OpenRepository | undefined ;
You can’t perform that action at this time.
0 commit comments