-
Notifications
You must be signed in to change notification settings - Fork 931
(#3675) Extract all used environment variables #3241
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
Conversation
df1f840 to
76676a3
Compare
|
Putting this back to draft, as we can not make all internal types available for dependent projects. |
76676a3 to
bf0d8b9
Compare
e489690 to
7cfa192
Compare
|
Converted this PR to draft until it is ready to be reviewed. |
c507e12 to
c439222
Compare
|
@gep13 this PR is now ready for review. |
src/chocolatey/infrastructure.app/services/PowershellService.cs
Outdated
Show resolved
Hide resolved
src/chocolatey/infrastructure.app/templates/ChocolateyReadMeTemplate.cs
Outdated
Show resolved
Hide resolved
e48a233 to
a20eed7
Compare
These changes extracts all of the environment variables that we make use of while running Chocolatey CLI. Both variables that are used as part of running package scripts, and variables we use only when they are set on the system. A change to make these environment variables and all other internal types available to other products and the test projects has been made.
…sources Update EnvironmentVariables class to reference constants from chocolatey.StringResources instead of hardcoded strings. Mark the old EnvironmentVariables class as obsolete to enforce usage of the new centralized resource definitions. Refactor Helpers/Paths.cs and Helpers/EnvironmentHelper.cs to use EnvironmentVariables.System.Path for PATH variable access and modification, ensuring consistency with the updated resource usage. These changes improve maintainability by consolidating environment variable names in a single source and prevent duplication errors.
a20eed7 to
bffbb2d
Compare
…E template
Change the placeholder from ChocolateyPackageExitCode to
{EnvironmentVariables.Package.ChocolateyExitCode} to reflect the
correct environment variable name used for the script exit code.
This improves accuracy and consistency in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
@AdmiringWorm great work here! Thanks for getting this done! |
|
I have removed this PR from the milestone, since the issue #3675 is already contained in the milestone. |
Description Of Changes
These changes extracts all of the environment variables that we
make use of while running Chocolatey CLI. Both variables that are
used as part of running package scripts, and variables we use
only when they are set on the system.
A change to make these environment variables and all other internal
types available to other products and the test projects has been made.
Motivation and Context
To be able to have a single location to add and use environment variable names from.
Testing
N/A. Need to be ran through test kitchen.
Operating Systems Testing
Change Types Made
Change Checklist
Related Issue
fixes #3675