Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: codegen - project paths with spaces #31141

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ def use_react_native_codegen!(spec, options={})
modules_output_dir = "React/#{modules_library_name}/#{modules_library_name}"

# Run the codegen as part of the Xcode build pipeline.
env_vars = "SRCS_DIR=#{js_srcs}"
env_vars += " MODULES_OUTPUT_DIR=#{prefix}/#{modules_output_dir}"
env_vars += " MODULES_LIBRARY_NAME=#{modules_library_name}"
env_vars = "SRCS_DIR='#{js_srcs}'"
env_vars += " MODULES_OUTPUT_DIR='#{prefix}/#{modules_output_dir}'"
env_vars += " MODULES_LIBRARY_NAME='#{modules_library_name}'"

generated_dirs = [ modules_output_dir ]
generated_filenames = [ "#{modules_library_name}.h", "#{modules_library_name}-generated.mm" ]
Expand All @@ -172,7 +172,7 @@ def use_react_native_codegen!(spec, options={})
# Eventually, we want these to be part of the same library as #{modules_library_name} above.
components_output_dir = "ReactCommon/react/renderer/components/rncore/"
generated_dirs.push components_output_dir
env_vars += " COMPONENTS_OUTPUT_DIR=#{prefix}/#{components_output_dir}"
env_vars += " COMPONENTS_OUTPUT_DIR='#{prefix}/#{components_output_dir}'"
components_generated_filenames = [
"ComponentDescriptors.h",
"EventEmitters.cpp",
Expand All @@ -194,5 +194,5 @@ def use_react_native_codegen!(spec, options={})
:execution_position => :before_compile,
:show_env_vars_in_log => true
}
spec.prepare_command = "mkdir -p #{generated_dirs.reduce("") { |str, dir| "#{str} ../../#{dir}" }} && touch #{generated_files.reduce("") { |str, filename| "#{str} ../../#{filename}" }}"
spec.prepare_command = "mkdir -p #{generated_dirs.map {|dir| "'../../#{dir}'"}.join(" ")} && touch #{generated_files.map {|file| "'../../#{file}'"}.join(" ")}"
end