lib/output/output.rb in prenus-0.0.7 vs lib/output/output.rb in prenus-0.0.8
- old
+ new
@@ -16,11 +16,14 @@
@events = events
@hosts = hosts
@options = options
if @options[:type] == "html" #Therefore, the output should be a folder name, not a file
+
+ @options[:output] = "." if @options[:output].nil?
+
#Check if the output dir exists
- Dir.mkdir(options[:output]) unless File.exists?(options[:output])
+ Dir.mkdir(@options[:output]) unless File.exists?(@options[:output])
else
@oFile = File.new(@options[:output],'w') unless @options[:output].nil?
@oFile = STDOUT if @oFile.nil?
end
\ No newline at end of file