From 87b1d68a624528f7f8ed0d7f6fe73b68bbaf8fed Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sat, 6 Jan 2024 01:08:51 +0900 Subject: [PATCH] Raise an exception if automation task `system` fails Same as https://github.com/rubocop/rubocop-minitest/commit/8f8f978. --- tasks/changelog.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/changelog.rake b/tasks/changelog.rake index 0004e389bd..13bad1fd46 100644 --- a/tasks/changelog.rake +++ b/tasks/changelog.rake @@ -9,7 +9,7 @@ namespace :changelog do ref_type = :pull if args[:id] path = Changelog::Entry.new(type: type, ref_id: args[:id], ref_type: ref_type).write cmd = "git add #{path}" - system cmd + system cmd, exception: true puts "Entry '#{path}' created and added to git index" end end @@ -21,7 +21,7 @@ namespace :changelog do Changelog.new.merge!.and_delete! cmd = "git commit -a -m 'Update Changelog'" puts cmd - system cmd + system cmd, exception: true end task :check_clean do