We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ed7593 commit c9f42dbCopy full SHA for c9f42db
lib/skunk/cli/application.rb
@@ -23,6 +23,10 @@ def execute
23
24
parsed_options = @options.parse.to_h
25
reporter = Skunk::Cli::CommandFactory.create(parsed_options).execute
26
+
27
+ @parsed_options = @options.parse.to_h
28
+ reporter = Skunk::Cli::CommandFactory.create(@parsed_options).execute
29
30
print(reporter.status_message)
31
reporter.status
32
rescue OptionParser::InvalidOption => error
@@ -38,7 +42,12 @@ def warn_coverage_info
38
42
end
39
43
40
44
def print(message)
41
- @options.output_stream.puts message
45
+ filename = @parsed_options[:output_filename]
46
+ if filename.nil?
47
+ $stdout.puts(message)
48
+ else
49
+ File.open(filename, "w") { |f| f.puts(message) }
50
+ end
51
52
53
0 commit comments