Method: Inspec::Resources::UnixHostProvider#missing_requirements

Defined in:
lib/inspec/resources/host.rb

#missing_requirements(protocol) ⇒ Object



175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'lib/inspec/resources/host.rb', line 175

def missing_requirements(protocol)
  missing = []

  if %w{tcp udp}.include?(protocol) && !@has_nc && !@has_ncat
    if @has_net_redirections
      missing << "#{timeout} (part of coreutils) or netcat must be installed" unless inspec.command(timeout).exist?
    else
      missing << "netcat must be installed"
    end
  end

  missing
end