Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make sure we read from stdin when only options are given.

  • Loading branch information...
commit 90e8844f516f6dcd85ccef0a70c74e56562c8a68 1 parent 7c1c84f
@jarib authored
Showing with 2 additions and 3 deletions.
  1. +1 −2  bin/har
  2. +1 −1  lib/har/viewer.rb
View
3  bin/har
@@ -3,8 +3,7 @@
require "har"
begin
- ARGV << "-" if ARGV.empty?
HAR::Viewer.new(ARGV).show
rescue HAR::Error => ex
abort "\n\n#{ex.message}"
-end
+end
View
2  lib/har/viewer.rb
@@ -10,7 +10,7 @@ def initialize(args)
@running = false
@options = parse(args)
- if args == ["-"]
+ if args == ["-"] || args.empty?
progress("Reading HAR from stdin...") {
@har = Archive.from_file $stdin
}
Please sign in to comment.
Something went wrong with that request. Please try again.