File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed
lib/fastlane/plugin/wpmreleasetoolkit/helper Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1414
1515### Bug Fixes
1616
17- _ None _
17+ - Fix ` can't modify frozen String: "transparent" ` and other ` FrozenError ` crashes in ` promo_screenshots_action ` . [ # 653 ]
1818
1919### Internal Changes
2020
Original file line number Diff line number Diff line change @@ -24,10 +24,12 @@ module Helper
2424 class PromoScreenshots
2525 def initialize
2626 if $skip_magick
27- message = "PromoScreenshots feature is currently disabled.\n "
28- message << "Please, install RMagick if you aim to generate the PromoScreenshots.\n "
29- message << "'bundle install --with screenshots' should do it if your project is configured for PromoScreenshots.\n "
30- message << 'Aborting.'
27+ message = <<~MSG
28+ PromoScreenshots feature is currently disabled.
29+ Please, install RMagick if you aim to generate the PromoScreenshots.
30+ 'bundle install --with screenshots' should do it if your project is configured for PromoScreenshots.
31+ Aborting.
32+ MSG
3133 UI . user_error! ( message )
3234 end
3335
@@ -400,10 +402,13 @@ def open_image(path)
400402 end
401403
402404 def create_image ( width , height , background = 'transparent' )
403- background . paint . to_hex
405+ # The paint method we call below modifies the string in place.
406+ # But if the string is frozen, we need to dup it first, otherwise we'll get a frozen string error.
407+ working_background = background . frozen? ? background . dup : background
408+ working_background . paint . to_hex
404409
405410 Image . new ( width , height ) do
406- self . background_color = background
411+ self . background_color = working_background
407412 end
408413 end
409414
You can’t perform that action at this time.
0 commit comments