From b0d6c19ab428c1d418283030fa720c31a3ce4104 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 23 May 2024 22:35:51 -0300 Subject: [PATCH] Update rescue.rb --- cli/lib/twenty/cli/command/hook/rescue.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/lib/twenty/cli/command/hook/rescue.rb b/cli/lib/twenty/cli/command/hook/rescue.rb index 6308acb..ba572f8 100644 --- a/cli/lib/twenty/cli/command/hook/rescue.rb +++ b/cli/lib/twenty/cli/command/hook/rescue.rb @@ -2,8 +2,8 @@ module Twenty::Command::Hook module Rescue - FRAME_MAX = 15 - INDENT_BY = 2 + FRAMEMAX = 15 + INDENTBY = 2 def run(...) super(...) @@ -12,7 +12,7 @@ module Twenty::Command::Hook $stderr.print "\n", " ", Paint[" Exception ", :white, :red, :bold], "\n", " ", Paint[ex.class.to_s, :bold], "\n", - ex.message.each_line.map { [" " * INDENT_BY, _1] }.join, + ex.message.each_line.map { [" " * INDENTBY, _1] }.join, "\n\n", " ", Paint[" Backtrace ", :white, :blue, :bold], "\n", format_backtrace(ex.backtrace), "\n", @@ -22,8 +22,8 @@ module Twenty::Command::Hook private def format_backtrace(backtrace) - backtrace[0..FRAME_MAX - 1].map do - [" " * INDENT_BY, _1.gsub(Dir.getwd, "")].join + backtrace[0..FRAMEMAX - 1].map do + [" " * INDENTBY, _1.gsub(Dir.getwd, "")].join end.join("\n") end end