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

Chef crashes with newer version of chocolatey #51

Open
Pelotrio opened this issue Sep 7, 2023 · 0 comments
Open

Chef crashes with newer version of chocolatey #51

Pelotrio opened this issue Sep 7, 2023 · 0 comments

Comments

@Pelotrio
Copy link

Pelotrio commented Sep 7, 2023

Problem

When using this library it will automatically install the newest version of chocolatey using the library it depends on. All version newer than 1.4.0 dont seem to be compatible with the script that installs chocolatey packages. When trying to install packages I get following error:

    Chef::Exceptions::Package
    -------------------------
    No candidate version available for git

    Resource Declaration:
    ---------------------
    # In c:/users/pc/documents/mas-automation/tools/provision/scripts/local-mode-cache/cache/cookbooks/windev/recipes/choco_packages.rb

     30:     chocolatey_package pkg["name"] do
     31:       version pkg_version unless pkg_version.empty?
     32:       source pkg_source unless pkg_source.empty?
     33:       options pkg_options unless pkg_options.empty?
     34:       returns [0,3010] + pkg.fetch('exit_codes', [])
     35:       action package_action
     36:     end
     37:   end

    Compiled Resource:
    ------------------
    # Declared in c:/users/pc/documents/mas-automation/tools/provision/scripts/local-mode-cache/cache/cookbooks/windev/recipes/choco_packages.rb:30:in `block in from_file'

    chocolatey_package("git") do
      package_name ["git"]
      action [:upgrade]
      default_guard_interpreter :default
      declared_type :chocolatey_package
      cookbook_name "windev"
      recipe_name "choco_packages"
      options "--install-arguments='/verysilent /DIR=C:\\tools\\git /pathoption=BashOnly /components=ext,ext\\shellhere,gitlfs,consolefont /CRLFOption=CRLFAlways /SSHOption=OpenSSL  /CURLOption=OpenSSL'"
      returns [0, 3010]
    end

Possible solutions

Either the script that installs packages has to be updated to support newer versions or the version of choco that gets installed has to be locked to version 1.4.0. The annoying thing about this is that this is only fixable when manually downgrading to this version and then re-running chef which is not optimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant