saz / puppet-sudo

Manage sudo with Puppet on Debian-, RedHat- and SUSE-based linux distributions and some BSDs
Other
105 stars 215 forks source link

Remove two trailing commas that violate JSON semantics which break librarian-puppet #111

Closed mcallaway closed 9 years ago

mcallaway commented 9 years ago

librarian-puppet --verbose --clean install errors with:

[Librarian]     --> be18ce4b147c8b36ba4c4442cdb4985a63077705
/opt/rubies/1.9.3-p545/lib/ruby/gems/1.9.1/gems/json-1.8.2/lib/json/common.rb:155:in `parse': 399: unexpected token at '], (JSON::ParserError)
  "dependencies": [
    { "name": "puppetlabs/stdlib", "version_requirement": ">=2.3.0 <5.0.0" },
  ]
}'

Using a json parser like "jq" one can see problematic commas (http://stedolan.github.io/jq/):

-> cat metadata.json  | jq .
parse error: Expected another array element at line 20, column 4

Remove that comma:

-> cat metadata.json  | jq .
parse error: Expected another array element at line 23, column 3

Remove the second comma. Then you have no errors.

pbyrne413 commented 9 years ago

FYI there are already two pull requests for this issue

mcallaway commented 9 years ago

Ah yes... my fault for not checking.