Skip to content

Commit

Permalink
Fixup the dependency line matching
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed Jul 28, 2020
1 parent 73aaabb commit b966f5c
Showing 1 changed file with 4 additions and 1 deletion.
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('^\w+:')

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

0 comments on commit b966f5c

Please sign in to comment.