Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6563

Windows gem install requires quotes around versions with ~> while linux does not

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.8.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Pessimistic version constraints (the "twiddle-wakka") now work in the Gem provider on Windows

      Description

      If I pass ensure => '~>0.7.0' to gem (or in this case, puppet_gem) provider on windows I'll get this:

      Error: Could not update: Execution of 'C:/Program Files/Puppet Labs/Puppet/sys/ruby/bin/gem.bat install -v ~>0.7.0 --no-rdoc --no-ri azure' returned 1: ERROR: While executing gem ... (Gem::Requirement::BadRequirementError)
      Illformed requirement ["~"]

      To work I need to pass ensure => '"~0.7.0"'. However if I do that, on linux I get: Illformed requirement ["\"~>1.0.0\""]

      I could put logic in my puppet code to deal with this, but seems like logic in the gem provider would be better. I've created a pull request for this:
      https://github.com/puppetlabs/puppet/pull/5104

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                qa qa
                Reporter:
                chris.matteson Chris Matteson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: