[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

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



 Comments   
Comment by Kenn Hussey [ 2016/10/31 ]

Branan Riley does this need release notes?

Generated at Thu Nov 21 02:40:51 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.