Skip to content

Commit

Permalink
fix warning in Slim::Command when using slimrb
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkie committed May 13, 2019
1 parent ae8e733 commit c970675
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/slim/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,19 @@ def process
Template.new(@options[:file]) { @options[:input].read }.render(nil, locals)
end

rescue Exception => ex
raise ex if @options[:trace] || SystemExit === ex
$stderr.print "#{ex.class}: " if ex.class != RuntimeError
$stderr.puts ex.message
$stderr.puts ' Use --trace for backtrace.'
exit 1
else
unless @options[:output]
file = args.shift
@options[:output] = file ? File.open(file, 'w') : $stdout
end
@options[:output].puts(result)
exit 0
rescue Exception => ex
raise ex if @options[:trace] || SystemExit === ex
$stderr.print "#{ex.class}: " if ex.class != RuntimeError
$stderr.puts ex.message
$stderr.puts ' Use --trace for backtrace.'
exit 1
else
unless @options[:output]
file = args.shift
@options[:output] = file ? File.open(file, 'w') : $stdout
end
@options[:output].puts(result)
exit 0
end
end
end

0 comments on commit c970675

Please sign in to comment.