[PUP-6563] Windows gem install requires quotes around versions with ~> while linux does not Created: 2016/07/08  Updated: 2016/11/02  Resolved: 2016/10/31

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 4.8.0

Type: Bug Priority: Normal
Reporter: Chris Matteson Assignee: qa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Release Notes: Bug Fix
Release Notes Summary: Pessimistic version constraints (the "twiddle-wakka") now work in the Gem provider on Windows


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:

Comment by Kenn Hussey [ 2016/10/31 ]

Branan Riley does this need release notes?

Generated at Fri Jul 03 19:03:26 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.