Skip to content
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

Refresh environment variables after each install #439

Closed
ferventcoder opened this issue Sep 30, 2015 · 2 comments
Closed

Refresh environment variables after each install #439

ferventcoder opened this issue Sep 30, 2015 · 2 comments

Comments

@ferventcoder
Copy link
Member

Building off of #420, we should ensure that the environment is refreshed in chocolatey prior to calling the install of the next package.

@ferventcoder ferventcoder added this to the 0.9.10.x milestone Sep 30, 2015
@ferventcoder ferventcoder modified the milestones: 0.9.10, 0.9.10.x, 0.9.10.1 Sep 30, 2015
@ferventcoder ferventcoder modified the milestones: 0.9.10, 0.9.10.1 Apr 21, 2016
@ferventcoder ferventcoder self-assigned this Jun 5, 2016
ferventcoder added a commit that referenced this issue Jun 5, 2016
Add both GetEnvironmentVariables methods to the adapter.
ferventcoder added a commit that referenced this issue Jun 5, 2016
Update/refresh environment environment variables with updates from out
of process or during subprocesses. The process of updating environment
variables involves the following steps:

- capture original environment variables
- get updated machine/user environment values from the registry
- set current environment values with updated items, machine first,
   then user. This ensures that user values that override system values
   are set appropriately.
- reset process overridden variables (username, processor_architecture)
- combine Path, PathExt, PsModulePath with Machine, User, Process
   values.
- Path/PathExt is rebuilt with machine, then user, then process.
- PsModulePath is rebuilt with user, then machine, then process.
ferventcoder added a commit that referenced this issue Jun 5, 2016
Before running each package script, refresh the process environment
variables so that the subprocess will inherit those. This allows
updates to PATH and additional environment variables to be taken
advantage of in packages that may depend on them being set by a package
dependency that installs during the same run.
ferventcoder added a commit that referenced this issue Jun 5, 2016
* stable:
  (GH-439) Refresh Environment Before Package Scripts
  (GH-439) Update Environment Variables
  (GH-439) Environment adapter GetEnvironmentVariables
  (maint) formatting
  (maint) rename Environment Path Separator
  (GH-620) Set pro/business environment
  (GH-620) Set environment variables after options
@ferventcoder
Copy link
Member Author

@eavonius particularly 7552379

@ferventcoder
Copy link
Member Author

In the C# flavor of this, we rebuild PSModulePath from user, then machine, then current process additions. This is in the spirit of both #129 and #295 I believe.

ferventcoder added a commit that referenced this issue Jun 12, 2016
Refreshing environment variables should be done before setting the
values from configuration as any conflicts should be given to what is
in the configuration - namely setting TEMP and other variables we want
to override.
ferventcoder added a commit that referenced this issue Jun 12, 2016
* stable:
  (GH-439) update environment before setting custom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants