rnelson0 / puppet-generate-puppetfile

Generate or update a Puppetfile for use with r10k or librarian-puppet. Optionally, create a fixtures file for rspec-puppet.
92 stars 22 forks source link

failure to parse Puppetfile when colon is used #72

Open logicminds opened 4 years ago

logicminds commented 4 years ago

When a Puppetfile contains the following syntax

mod 'stdlib',
  git: 'git@github.com:puppetlabs/puppetlabs-stdlib',
  ref: '4.25.1'

And the command is run generate-puppetfile -p Puppetfile --fixtures-only --modulename jboss

The fixtures file does not contain the stdlib module.

rnelson0 commented 4 years ago

Can you provide a gist showing the full Puppetfile before and after, or at least the relevant section?

logicminds commented 4 years ago

Is there something wrong with the relevant section I posted above?

In essence your regex only searches for hash rockets and doesn't parse colons.