-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-enable env var directives in the .NET CLI #37827
Re-enable env var directives in the .NET CLI #37827
Conversation
We'll need to get servicing approval for this one |
Approved for servicing over email, merging! |
@baronfel I dug a little in the history and it doesn't look like this was "forgotten" per se. What seems to have happened is the structure of how it was indicated in the S.CL changed in a major breaking change in the June timeframe. In the past, it is likely this functionality was included in some other directive, as I don't see it explicitly being enabled in our code from this pull request. But now, they've made it its own explicit directive and that wasn't added because, since we didn't have tests for it, it didn't seem to be needed/required. So, a series of changes/oversights lead to the functionality not being included. 🙃 Thank you for adding the test as that will help the functionality remain, even if S.CL changes more under the hood. |
@MiYanni back when I started testing out
|
@xt0rted Ohhhh! Okay, that's good to know. I didn't know it was |
Fixes #37686
Description
This re-adds the EnvironmentVariableDirective, which used to be a default part of the CLI configuration but was removed in a refactoring.
Customer Impact
Customers that set environment variables using this mechanism (which is OS agnostic and scoped only to a single command) suddenly had their commands break. After this change, their scripts will work again.
Regression?
Yes, a System.CommandLine update broke silently in the 8.0.100 preview cycles.
Risk
Low
Tests
Automated tests were added to ensure the env-var setting functionality is verified at the SDK-level, not just the S.CL-level.