Skip to content

Commit

Permalink
Update config parsing to handle Psych errors
Browse files Browse the repository at this point in the history
  • Loading branch information
waferbaby committed Dec 1, 2024
1 parent fed729f commit c30633c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bin/dimples
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ config = {}
if File.exist?(config_path)
config = begin
YAML.safe_load_file(config_path, symbolize_names: true)
rescue YAML::Error
puts 'Failed to parse config - using defaults'
ensure
{}
rescue StandardError => e
puts "Failed to parse config #{e} - using defaults"
end
end

Expand Down

0 comments on commit c30633c

Please sign in to comment.