diff --git a/README.md b/README.md index 0e9c3b8..39ec57a 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ import_from_git(url: "git@github.com:BottleRocketStudios/iOS-BuildActions.git") ``` -Option 1 - Use `begin` - `rescue`: +Option 1 - Use `begin` - `ensure`: ```ruby platform :ios do @@ -33,11 +33,9 @@ platform :ios do should_log: true ) # `gym` command not shown + # ... + ensure build_cleanup - - rescue => exception - build_cleanup - raise exception end end end @@ -56,12 +54,13 @@ platform :ios do should_log: true ) # `gym` command not shown + # ... build_cleanup end error do |lane, exception| - UI.error("Lane [#{lane}] Threw Exception: #{exception}") - cleanup_build # Keep in mind if you have other lanes, they may not need cleanup! + UI.error("Lane [#{lane}] Threw Exception: #{exception}") + build_cleanup # Keep in mind if you have other lanes, they may not need cleanup! end end ```