Permalink
Browse files

Fix output

  • Loading branch information...
1 parent 07338bd commit df1c1848fee51e6d82fc3ff649dd5fc66ef64a49 @jarib committed Jan 10, 2011
Showing with 9 additions and 6 deletions.
  1. +9 −6 lib/har/viewer.rb
View
@@ -22,12 +22,15 @@ def show
private
def archives_from(hars)
- progress("Validating archives...") {
- hars = hars.map { |path| Archive.from_file(path) }
- hars.each { |h| h.validate! } if @options[:validate]
+ hars = hars.map { |path| Archive.from_file(path) }
- hars
- }
+ if @options[:validate]
+ progress("Validating archives...") do
+ hars.each { |h| h.validate! }
+ end
+ end
+
+ hars
end
def create_root
@@ -66,7 +69,7 @@ def parse(args)
OptionParser.new do |opts|
opts.banner = "Usage: har [options] [files]"
-
+
opts.on "-p", "--port PORT", Integer do |int|
options[:port] = int
end

0 comments on commit df1c184

Please sign in to comment.