Skip to content

Commit

Permalink
fix: script phases warning (#35594)
Browse files Browse the repository at this point in the history
Summary:
Running pod install result in some warninigs on ruby v3:
```
script_phases.rb:51: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
script_phases.rb:51: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
```

## Changelog

[INTERNAL] [FIXED] - warnings while running `pod-install` inside script phase script

Pull Request resolved: #35594

Test Plan:
- Install ruby v3 (I haven't tested on ruby v2, most m1 users need to upgrade to v3)
- Run `pod install` in ios folder

Reviewed By: christophpurrer

Differential Revision: D41839668

Pulled By: cortinico

fbshipit-source-id: f3d328573179ddfd307011f0701f0befa0b111f8
  • Loading branch information
matinzd authored and facebook-github-bot committed Dec 8, 2022
1 parent 76bf71e commit 48966eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/react_native_pods_utils/script_phases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ def get_script_template(react_native_path, export_vars={})
WITH_ENVIRONMENT="$RCT_SCRIPT_RN_DIR/scripts/xcode/with-environment.sh"
/bin/sh -c "$WITH_ENVIRONMENT $SCRIPT_PHASES_SCRIPT"
EOS
result = ERB.new(template, 0, '->').result(binding)
result = ERB.new(template, trim_mode: '->').result(binding)
return result
end

0 comments on commit 48966eb

Please sign in to comment.