forked from chocolatey-archive/puppet-chocolatey
-
Notifications
You must be signed in to change notification settings - Fork 68
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
(MODULES-3641) Remove Windows_env module dependency #34
Merged
jpogran
merged 2 commits into
puppetlabs:master
from
ferventcoder:ticket/master/MODULES-3641-remove-windows_env
Aug 4, 2016
Merged
(MODULES-3641) Remove Windows_env module dependency #34
jpogran
merged 2 commits into
puppetlabs:master
from
ferventcoder:ticket/master/MODULES-3641-remove-windows_env
Aug 4, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
183b555
to
63ff946
Compare
63ff946
to
33c6831
Compare
|
Rebased against #33 |
|
@puppetlabs/windows please review. |
33c6831
to
e809a62
Compare
When overriding the default installation directory, it can affect suitability during the same run that Chocolatey is installed during. Clarify what that is so folks can make an informed opinion for installation.
e809a62
to
05cae20
Compare
It was originally required to set the environment variables prior to running Chocolatey install to help prepare the environment for suitability. It was originally added in 5a849ad and ad57d14 to ensure that Chocolatey could be suitable to be installed and used to install packages on the first run. This was also to ensure that you could override the Chocolatey install directory by setting the value in advance of the install. In b5034d1 @rismoney removed the necessity for pre-setting the environment variable as it was passed to the install exec. We have since determined that the providers default to a location of `$env:ALLUSERSPROFILE\chocolatey\bin\choco.exe` when an install path cannot be found. https://github.com/puppetlabs/puppetlabs-chocolatey/blob/fa67417bbfac06049f36346e02eb09dddb68084c/lib/puppet_x/chocolatey/chocolatey_common.rb#L31-L36 This evaluates to the default install path of `C:\ProgramData\chocolatey\bin\choco.exe`, allowing suitability to work properly on the same converge as the install ONLY if you install to the default install location with Chocolatey. This has nothing to do with the hope that windows_env would update the current shell! So it is safe to remove windows_env without losing any of the current behavior.
05cae20
to
10535d9
Compare
| @@ -2,6 +2,5 @@ fixtures: | |||
| forge_modules: | |||
| stdlib: "puppetlabs/stdlib" | |||
| powershell: "puppetlabs/powershell" | |||
| windows_env: "badgerious/windows_env" | |||
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.
Cleaned up after @jamesp noticed this was still in here.
|
Found MODULES-3677 during testing, work to fix that requires new ticket and is not related to this one. 👍 |
ThoughtCrhyme
pushed a commit
to ThoughtCrhyme/puppetlabs-chocolatey
that referenced
this pull request
Mar 20, 2017
…-document_qaelk (QA-2747) document qaelk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It was originally required to set the environment variables prior
to running Chocolatey install to help prepare the environment for
suitability. It was originally added in 5a849ad and ad57d14
to ensure that Chocolatey could be suitable to be installed and
used to install packages on the first run. This was also to
ensure that you could override the Chocolatey install directory
by setting the value in advance of the install.
In b5034d1 @rismoney removed the necessity for pre-setting the
environment variable as it was passed to the install exec.
We have since determined that the providers default to a location
of
$env:ALLUSERSPROFILE\chocolatey\bin\choco.exewhen an installpath cannot be found.
puppetlabs-chocolatey/lib/puppet_x/chocolatey/chocolatey_common.rb
Lines 31 to 36 in fa67417
This evaluates to the default install path of
C:\ProgramData\chocolatey\bin\choco.exe, allowing suitabilityto work properly on the same converge as the install ONLY if you
install to the default install location with Chocolatey. This
has nothing to do with the hope that windows_env would update
the current shell! So it is safe to remove windows_env without
losing any of the current behavior.