Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-4091

When using alternate chocolatey install directory, ChocolateyInstall does not get set.

    XMLWordPrintable

Details

    • Hide

      When executing the following with PowerShell module v2.x+ it should properly set the install directory to the location specified ("c:\choco"):

      class {'chocolatey':
        log_output              => true,
        choco_install_location  => 'c:\choco',
      }
      

      Before the code was merged, you would see it install to the original directory and on subsequent runs it would run this resource again because it would be looking for choco.exe at c:\choco\bin\choco.exe and not finding it there.

      Show
      When executing the following with PowerShell module v2.x+ it should properly set the install directory to the location specified ("c:\choco"): class { 'chocolatey' : log_output => true , choco_install_location => 'c:\choco' , } Before the code was merged, you would see it install to the original directory and on subsequent runs it would run this resource again because it would be looking for choco.exe at c:\choco\bin\choco.exe and not finding it there.
    • Modules
    • 1
    • Modules 2016-11-30

    Description

      The chocolatey configuration tools (chocolateysource, chocolateyconfig, and chocolateyfeature) depend on the ChocolateyInstall environment variable to be set to find the chocolatey config directory, but the install class does not successfully set the environment. Rebooted the server and chocolateysource resource still fails with error:

      Error: Failed to apply catalog: Validation of Chocolateysource[nexus] failed: Chocolatey version must be '0.9.9.0' to manage configuration values with Puppet. Detected '' as your version. Please upgrade Chocolatey to use this resource. at /opt/puppet-code/environments/rick_scratch_choco/site/profiles/manifests/chocolatey.pp:23

      Workaround by setting the registry key 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\ChocolateyInstall' from a registry_value resource in the manifest before calling chocolateysource.

      Attachments

        Issue Links

          Activity

            People

              erick Erick Banks
              rick.renshaw Rick Renshaw
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support