Class: CycloneDX::CocoaPods::CLIRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/cyclonedx/cocoapods/cli_runner.rb

Overview

Interprets CLI parameters and runs the main workflow.

Instance Method Summary collapse

Instance Method Details

#runObject



38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/cyclonedx/cocoapods/cli_runner.rb', line 38

def run
  setup_logger # Needed in case we have errors while processing CLI parameters
  options = parse_options
  determine_output_format(options)
  setup_logger(verbose: options[:verbose])
  @logger.debug "Running cyclonedx-cocoapods with options: #{options}"

  component, manufacturer, pods, manifest_path, dependencies = analyze(options)

  build_and_write_bom(options, component, manufacturer, pods, manifest_path, dependencies)
rescue StandardError => e
  @logger.error ([e.message] + e.backtrace).join($INPUT_RECORD_SEPARATOR)
  exit 1
end