Skip to content

Commit

Permalink
fix undefined plain_output?
Browse files Browse the repository at this point in the history
  • Loading branch information
flyerhzm committed Feb 28, 2024
1 parent a2e4d38 commit f96e718
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/synvert/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ def run_snippet(rewriter, format)
if ENV['DEBUG']
puts e.backtrace.join("\n")
end
if plain_output?
puts "Error: #{e.message}"
else
if format == 'json'
puts({ error: e.message }.to_json)
else
puts "Error: #{e.message}"
end
raise
end
Expand Down

0 comments on commit f96e718

Please sign in to comment.