Skip to content

Commit 8273178

Browse files
authored
Fix Environment Variable check for TeamCity Log
Was previously look for TF_BUILD which is for TFS/VSTS Environments.
1 parent cf03deb commit 8273178

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Cake.TeamCity.Module/TeamCityLog.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public TeamCityLog(IConsole console, Verbosity verbosity = Verbosity.Normal)
1616

1717
public void Write(Verbosity verbosity, LogLevel level, string format, params object[] args)
1818
{
19-
if (!string.IsNullOrWhiteSpace(System.Environment.GetEnvironmentVariable("TF_BUILD")))
19+
if (!string.IsNullOrWhiteSpace(System.Environment.GetEnvironmentVariable("TEAMCITY_VERSION")))
2020
{
2121
switch (level)
2222
{
@@ -46,4 +46,4 @@ public Verbosity Verbosity
4646
set { _cakeLogImplementation.Verbosity = value; }
4747
}
4848
}
49-
}
49+
}

0 commit comments

Comments
 (0)