Skip to content

Commit

Permalink
Merge pull request #771 from rabbitmq/lrb-fix-processing-fetch-deps
Browse files Browse the repository at this point in the history
Fixup the dependency line matching
  • Loading branch information
xtreme-shane-lattanzio authored Jul 31, 2020
2 parents 73aaabb + 75b7696 commit 4fb5ba4
Show file tree
Hide file tree
Showing 2 changed files with 2,205 additions and 354 deletions.
5 changes: 4 additions & 1 deletion lib/license_finder/package_managers/erlangmk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def deps
stdout, stderr, status = Cmd.run(command)
raise "Command '#{command}' failed to execute: #{stderr}" unless status.success?

stdout.each_line.map(&:strip).reject { |line| line.start_with?('make') }
dep_re = Regexp.new('^\s*DEP')
line_re = Regexp.new('^[_a-z0-9]+:')

stdout.each_line.map(&:strip).select { |line| !(line.start_with?('make') || line =~ dep_re) && line =~ line_re }
end
end
end
Loading

0 comments on commit 4fb5ba4

Please sign in to comment.