Method: PDK::Module::Build#warn_symlink

Defined in:
lib/pdk/module/build.rb

Warn the user about a symlink that would have been included in the built package.

Parameters:

  • path (String)

    The relative or absolute path to the symlink.

Returns:

  • nil.



154
155
156
157
158
159
160
161
162
163
164
# File 'lib/pdk/module/build.rb', line 154

def warn_symlink(path)
  require 'pathname'

  symlink_path = Pathname.new(path)
  module_path = Pathname.new(module_dir)

  PDK.logger.warn _('Symlinks in modules are not supported and will not be included in the package. Please investigate symlink %{from} -> %{to}.') % {
    from: symlink_path.relative_path_from(module_path),
    to:   symlink_path.realpath.relative_path_from(module_path),
  }
end