Method: Puppet::ModuleTool::Applications::Unpacker#root_dir
- Defined in:
- lib/puppet/module_tool/applications/unpacker.rb
#root_dir ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/puppet/module_tool/applications/unpacker.rb', line 63 def root_dir return @root_dir if @root_dir # Grab the first directory containing a metadata.json file = Dir["#{tmpdir}/**/metadata.json"].min_by(&:length) if @root_dir = Pathname.new().dirname else raise _("No valid metadata.json found!") end end |