Skip to content

Commit 9961722

Browse files
committed
Use base class's provided Environment property
1 parent 74d4fb6 commit 9961722

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/GitVersionCore/BuildAgents/GitHubActions.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using GitVersion.Logging;
22
using GitVersion.OutputVariables;
33
using System.IO;
4-
using System.Text;
54

65
namespace GitVersion.BuildAgents
76
{
@@ -11,12 +10,10 @@ public class GitHubActions : BuildAgentBase
1110

1211
public GitHubActions(IEnvironment environment, ILog log) : base(environment, log)
1312
{
14-
this.environment = environment;
1513
}
1614

1715
public const string EnvironmentVariableName = "GITHUB_ACTIONS";
1816
public const string GitHubSetEnvTempFileEnvironmentVariableName = "GITHUB_ENV";
19-
private readonly IEnvironment environment;
2017

2118
protected override string EnvironmentVariable { get; } = EnvironmentVariableName;
2219

@@ -47,7 +44,7 @@ public override void WriteIntegration(System.Action<string> writer, VersionVaria
4744
return;
4845
}
4946

50-
var gitHubSetEnvFilePath = environment.GetEnvironmentVariable(GitHubSetEnvTempFileEnvironmentVariableName);
47+
var gitHubSetEnvFilePath = this.Environment.GetEnvironmentVariable(GitHubSetEnvTempFileEnvironmentVariableName);
5148

5249
if (gitHubSetEnvFilePath != null)
5350
{

0 commit comments

Comments
 (0)