This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,15 @@ public async Task CloneOrOpenRepository(
126
126
if ( DestinationDirectoryExists ( repositoryPath ) )
127
127
{
128
128
teamExplorerServices . OpenRepository ( repositoryPath ) ;
129
+
130
+ if ( isDotCom )
131
+ {
132
+ await usageTracker . IncrementCounter ( x => x . NumberOfGitHubOpens ) ;
133
+ }
134
+ else
135
+ {
136
+ await usageTracker . IncrementCounter ( x => x . NumberOfEnterpriseOpens ) ;
137
+ }
129
138
}
130
139
else
131
140
{
@@ -138,7 +147,6 @@ public async Task CloneOrOpenRepository(
138
147
}
139
148
else
140
149
{
141
- // If it isn't a GitHub URL, assume it's an Enterprise URL
142
150
await usageTracker . IncrementCounter ( x => x . NumberOfEnterpriseClones ) ;
143
151
}
144
152
}
@@ -174,10 +182,10 @@ public async Task CloneRepository(
174
182
}
175
183
176
184
/// <inheritdoc/>
177
- public bool DestinationDirectoryExists ( string path ) => Directory . Exists ( path ) ;
185
+ public bool DestinationDirectoryExists ( string path ) => operatingSystem . Directory . DirectoryExists ( path ) ;
178
186
179
187
/// <inheritdoc/>
180
- public bool DestinationFileExists ( string path ) => File . Exists ( path ) ;
188
+ public bool DestinationFileExists ( string path ) => operatingSystem . File . Exists ( path ) ;
181
189
182
190
string GetLocalClonePathFromGitProvider ( string fallbackPath )
183
191
{
You can’t perform that action at this time.
0 commit comments