summaryrefslogtreecommitdiff
path: root/chef-config/lib/chef-config/workstation_config_loader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'chef-config/lib/chef-config/workstation_config_loader.rb')
-rw-r--r--chef-config/lib/chef-config/workstation_config_loader.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/chef-config/lib/chef-config/workstation_config_loader.rb b/chef-config/lib/chef-config/workstation_config_loader.rb
index d38cae3d88..45d1fb66d2 100644
--- a/chef-config/lib/chef-config/workstation_config_loader.rb
+++ b/chef-config/lib/chef-config/workstation_config_loader.rb
@@ -205,7 +205,7 @@ module ChefConfig
message = "You have an error in your config file #{config_file_path}\n\n"
message << "#{e.class.name}: #{e.message}\n"
filtered_trace = e.backtrace.grep(/#{Regexp.escape(config_file_path)}/)
- filtered_trace.each { |bt_line| message << " " << bt_line << "\n" }
+ filtered_trace.each do |bt_line| message << " " << bt_line << "\n" end
unless filtered_trace.empty?
line_nr = filtered_trace.first[/#{Regexp.escape(config_file_path)}:([\d]+)/, 1]
message << highlight_config_error(config_file_path, line_nr.to_i)
@@ -265,7 +265,7 @@ module ChefConfig
def highlight_config_error(file, line)
config_file_lines = []
- IO.readlines(file).each_with_index { |l, i| config_file_lines << "#{(i + 1).to_s.rjust(3)}: #{l.chomp}" }
+ IO.readlines(file).each_with_index do |l, i| config_file_lines << "#{(i + 1).to_s.rjust(3)}: #{l.chomp}" end
if line == 1
lines = config_file_lines[0..3]
else