@@ -9,26 +9,29 @@ namespace GitVersion;
99internal class GitVersionExecutor (
1010 ILog log ,
1111 IConsole console ,
12+ IVersionWriter versionWriter ,
13+ IHelpWriter helpWriter ,
1214 IConfigurationFileLocator configurationFileLocator ,
1315 IConfigurationProvider configurationProvider ,
1416 IConfigurationSerializer configurationSerializer ,
1517 IGitVersionCalculateTool gitVersionCalculateTool ,
1618 IGitVersionOutputTool gitVersionOutputTool ,
17- IVersionWriter versionWriter ,
18- IHelpWriter helpWriter ,
19+ IGitRepository gitRepository ,
1920 IGitRepositoryInfo repositoryInfo )
2021 : IGitVersionExecutor
2122{
2223 private readonly ILog log = log . NotNull ( ) ;
2324 private readonly IConsole console = console . NotNull ( ) ;
25+ private readonly IVersionWriter versionWriter = versionWriter . NotNull ( ) ;
26+ private readonly IHelpWriter helpWriter = helpWriter . NotNull ( ) ;
27+
2428 private readonly IConfigurationFileLocator configurationFileLocator = configurationFileLocator . NotNull ( ) ;
2529 private readonly IConfigurationProvider configurationProvider = configurationProvider . NotNull ( ) ;
2630 private readonly IConfigurationSerializer configurationSerializer = configurationSerializer . NotNull ( ) ;
2731
2832 private readonly IGitVersionCalculateTool gitVersionCalculateTool = gitVersionCalculateTool . NotNull ( ) ;
2933 private readonly IGitVersionOutputTool gitVersionOutputTool = gitVersionOutputTool . NotNull ( ) ;
30- private readonly IVersionWriter versionWriter = versionWriter . NotNull ( ) ;
31- private readonly IHelpWriter helpWriter = helpWriter . NotNull ( ) ;
34+ private readonly IGitRepository gitRepository = gitRepository . NotNull ( ) ;
3235 private readonly IGitRepositoryInfo repositoryInfo = repositoryInfo . NotNull ( ) ;
3336
3437 public int Execute ( GitVersionOptions gitVersionOptions )
@@ -49,6 +52,7 @@ public int Execute(GitVersionOptions gitVersionOptions)
4952
5053 private int RunGitVersionTool ( GitVersionOptions gitVersionOptions )
5154 {
55+ this . gitRepository . DiscoverRepository ( gitVersionOptions . WorkingDirectory ) ;
5256 var mutexName = this . repositoryInfo . DotGitDirectory ? . Replace ( Path . DirectorySeparatorChar . ToString ( ) , "" ) ?? string . Empty ;
5357 using var mutex = new Mutex ( true , $@ "Global\gitversion{ mutexName } ", out var acquired ) ;
5458
0 commit comments