Skip to content

Commit

Permalink
Remove unnecessary check for options[:output_format].
Browse files Browse the repository at this point in the history
* If `-o,--output` is given, but the output format cannot be inferred
  from the file's extension, it will default to the TXT output format.
  • Loading branch information
postmodern committed Jul 6, 2024
1 parent 7663b95 commit 4b203d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ronin/listener/cli/commands/dns.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Dns < Command
# The `DOMAIN` argument.
#
def run(domain)
output_file = if options[:output] && options[:output_format]
output_file = if options[:output]
options[:output_format].open(options[:output])
end

Expand Down
2 changes: 1 addition & 1 deletion lib/ronin/listener/cli/commands/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Http < Command
# Runs the `ronin-listener http` command.
#
def run
output_file = if options[:output] && options[:output_format]
output_file = if options[:output]
options[:output_format].open(options[:output])
end

Expand Down

0 comments on commit 4b203d8

Please sign in to comment.