Skip to content

Commit aa55a50

Browse files
committed
Logging should be enabled during init, fixed possible duplicate logging
1 parent 1299578 commit aa55a50

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

GitVersionExe/Program.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,12 @@ static void ConfigureLogging(Arguments arguments)
9999
s => log.AppendLine(s)
100100
};
101101

102-
if (arguments.Output == OutputType.BuildServer)
102+
if (arguments.Output == OutputType.BuildServer || arguments.LogFilePath == "console" || arguments.Init)
103103
{
104104
writeActions.Add(Console.WriteLine);
105105
}
106106

107-
if (arguments.LogFilePath == "console")
108-
{
109-
writeActions.Add(Console.WriteLine);
110-
}
111-
else if (arguments.LogFilePath != null)
107+
if (arguments.LogFilePath != null && arguments.LogFilePath != "console")
112108
{
113109
try
114110
{

0 commit comments

Comments
 (0)