From 4b97a0dc147cc9b7d0d3539db37dd8c23a1b86ab Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Fri, 13 Sep 2024 15:04:10 -0400 Subject: [PATCH] system handles exceptions correctly as of ruby 2.7 This pattern can be use wherever we rolled our own exception handling. --- lib/tasks/locale.rake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/tasks/locale.rake b/lib/tasks/locale.rake index c234710b39d..1ced4df35ab 100644 --- a/lib/tasks/locale.rake +++ b/lib/tasks/locale.rake @@ -312,10 +312,7 @@ namespace :locale do Dir.mkdir(combined_dir, 0o700) po_files.each do |locale, files| files.each do |file| - unless system "msgfmt --check #{file}" - puts "Fatal error running 'msgfmt --check' on file: #{file}. Review the output above." - exit 1 - end + system("msgfmt --check #{file}", :exception => true) end dir = File.join(combined_dir, locale)