mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
468b86bd37
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34100 This Diff continue the effort of refactor and test the cocoapods script, moving hermes setup in a dedicated `hermes.rb` file and adding some tests on the logic of the hermes handling. ## Changelog [iOS][Changed] - move and test Hermes setup from react_native_pods script into a dedicated file Reviewed By: cortinico Differential Revision: D37522432 fbshipit-source-id: 91112476aac576a30110e5dcd4e46fa12241962a
44 lines
953 B
Ruby
44 lines
953 B
Ruby
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
class Open3
|
|
@@collected_commands = []
|
|
@@collected_dirs = []
|
|
|
|
@@returned_text = ""
|
|
@@returned_status = 0
|
|
|
|
def self.capture2e(command, chdir: ".")
|
|
@@collected_commands.push(command)
|
|
@@collected_dirs.push(chdir)
|
|
|
|
return [*@@returned_text, @@returned_status]
|
|
end
|
|
|
|
def self.collected_commands
|
|
return @@collected_commands
|
|
end
|
|
|
|
def self.collected_dirs
|
|
return @@collected_dirs
|
|
end
|
|
|
|
def self.set_returned_text(text)
|
|
@@returned_text = text
|
|
end
|
|
|
|
def self.set_returned_status(status)
|
|
@@returned_status = status
|
|
end
|
|
|
|
def self.reset()
|
|
@@collected_commands = []
|
|
@@collected_dirs = []
|
|
|
|
@@returned_text = ""
|
|
@@returned_status = 0
|
|
end
|
|
end
|