Skip to content

Commit

Permalink
fixed issue with set git version environment not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
david-driscoll committed Jul 4, 2019
1 parent 25bbe20 commit 549b347
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Nuke/CustomDotNetBuildExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ static class CustomDotNetBuildExtensions
{
foreach (var item in JObject.FromObject(gitVersion))
{
settings = settings.AddEnvironmentVariable($"gitversion_{item.Key}".ToUpperInvariant(), item.Value.ToString());
var key = $"gitversion_{item.Key}".ToUpperInvariant();
if (settings.EnvironmentVariables.TryGetValue(key, out _)) continue;
settings = settings.AddEnvironmentVariable(key, item.Value.ToString());
}
return settings;
}
Expand Down

0 comments on commit 549b347

Please sign in to comment.