Method: Puppet::ModuleTool::Applications::Unpacker#sanity_check

Defined in:
lib/puppet/module_tool/applications/unpacker.rb

#sanity_checkObject

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.

Error on symlinks and other junk



46
47
48
49
50
51
52
53
# File 'lib/puppet/module_tool/applications/unpacker.rb', line 46

def sanity_check
  symlinks = Dir.glob("#{tmpdir}/**/*", File::FNM_DOTMATCH).map { |f| Pathname.new(f) }.select { |p| Puppet::FileSystem.symlink? p }
  tmpdirpath = Pathname.new tmpdir

  symlinks.each do |s|
    Puppet.warning _("Symlinks in modules are unsupported. Please investigate symlink %{from}->%{to}.") % { from: s.relative_path_from(tmpdirpath), to: Puppet::FileSystem.readlink(s) }
  end
end