diff options
| author | Markus Roberts <Markus@reality.com> | 2010-07-13 22:03:11 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-07-13 23:09:36 -0700 |
| commit | 06cc552b8b1196ff833eb911eccf1c234d4b0d67 (patch) | |
| tree | 915bb62821d600976d2c2db99f1d6e41d3a78518 /lib | |
| parent | 8747479d59fa211f41186c1ab68987bb4af55f0b (diff) | |
| download | puppet-06cc552b8b1196ff833eb911eccf1c234d4b0d67.tar.gz puppet-06cc552b8b1196ff833eb911eccf1c234d4b0d67.tar.xz puppet-06cc552b8b1196ff833eb911eccf1c234d4b0d67.zip | |
Fix for #4220 -- modules not implicitly loading their init files
The module init loading was broken in 7504f1e..b938edf and then gradually
removed as dead code. This is a minimal (and mildly ugly) reinsertion os it
with the addition of .rb support.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/module.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb index 83561449a..8da19c2ce 100644 --- a/lib/puppet/module.rb +++ b/lib/puppet/module.rb @@ -124,7 +124,7 @@ class Puppet::Module # defaulting to 'init.{pp,rb}' for empty modules. def match_manifests(rest) pat = File.join(path, MANIFESTS, rest || 'init') - Dir. + [manifest("init.pp"),manifest("init.rb")].compact + Dir. glob(pat + (File.extname(pat).empty? ? '.{pp,rb}' : '')). reject { |f| FileTest.directory?(f) } end |
