exe/hrw in hrw-0.2.3 vs exe/hrw in hrw-0.3.0
- old
+ new
@@ -1,8 +1,9 @@
#!/usr/bin/env ruby
require 'ostruct'
require 'optparse'
+
require 'hrw'
ARGV << '--help' if ARGV.empty?
options = OpenStruct.new
@@ -29,11 +30,10 @@
api = Hrw::API.new(options.url)
hash = api.submit(specs, scanner.package_manager)
result = api.retrieve(hash)
formatter = Hrw::Formatter.new
-vulnerable_deps = formatter.format(result)
-
-unless vulnerable_deps.empty?
- formatter.print_vulnerable_deps(vulnerable_deps)
+if formatter.pretty_print(result)
exit(1)
+else
+ exit(0)
end