mirror of
https://github.com/atom/atom.git
synced 2026-02-16 01:25:13 -05:00
Merge pull request #5660 from atom/bf-git-repository-provider-should-not-throw
Make sure that GitRepositoryProvider.repositoryForDirectorySync() return...
This commit is contained in:
@@ -11,7 +11,7 @@ findGitDirectorySync = (directory) ->
|
||||
# can return cached values rather than always returning new objects:
|
||||
# getParent(), getFile(), getSubdirectory().
|
||||
gitDir = directory.getSubdirectory('.git')
|
||||
if gitDir.existsSync() and isValidGitDirectorySync gitDir
|
||||
if gitDir.existsSync?() and isValidGitDirectorySync gitDir
|
||||
gitDir
|
||||
else if directory.isRoot()
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user