Skip to content

Commit f96e718

Browse files
committed
fix undefined plain_output?
1 parent a2e4d38 commit f96e718

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/synvert/command.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ def run_snippet(rewriter, format)
179179
if ENV['DEBUG']
180180
puts e.backtrace.join("\n")
181181
end
182-
if plain_output?
183-
puts "Error: #{e.message}"
184-
else
182+
if format == 'json'
185183
puts({ error: e.message }.to_json)
184+
else
185+
puts "Error: #{e.message}"
186186
end
187187
raise
188188
end

0 commit comments

Comments
 (0)