Skip to content

Make environment-derived properties change opt-in and read at use time#7715

Merged
rainersigwald merged 4 commits intodotnet:mainfrom
Forgind:partial-env-revert
Jun 20, 2022
Merged

Make environment-derived properties change opt-in and read at use time#7715
rainersigwald merged 4 commits intodotnet:mainfrom
Forgind:partial-env-revert

Conversation

@Forgind
Copy link
Copy Markdown
Contributor

@Forgind Forgind commented Jun 17, 2022

Fixes #

Context

Changes Made

Testing

Notes

/// <summary>
/// Log all environment variables whether or not they are used in a build in the binary log.
/// </summary>
public readonly bool LogAllEnvironmentVariables = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLENVIRONMENTVARIABLES"))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we keep this centralized and change it to =>?

{
Write(BinaryLogRecordKind.BuildStarted);
WriteBuildEventArgsFields(e);
if (Traits.Instance.LogAllEnvironmentVariables)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

@Forgind Forgind added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Jun 20, 2022
@rainersigwald rainersigwald merged commit 7a0fefe into dotnet:main Jun 20, 2022
Forgind added a commit to Forgind/msbuild that referenced this pull request Jun 21, 2022
rainersigwald added a commit that referenced this pull request Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants