Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Invoke
node
directly in generate-specs.sh (#30781)
Summary: Currently, Codegen bash wrapper (`generate-specs.sh`) for Xcode invokes JS-based Codegen tooling via `yarn --silent node <...>`. This breaks both: - when Yarn is not installed (if NPM is used), for obvious reasons - when Yarn v2 ("Berry") is active This PR changes the way `generate-specs.sh` locates `node` executable to the following algorithm: - use the path provided in the `NODE_BINARY` env var - if `NODE_BINARY` env var is not defined, find `node` with `command -v node` ## Changelog [iOS] [Fixed] - Fix Codegen silently failing when Yarn is not installed, or when Yarn v2 is active. Pull Request resolved: #30781 Test Plan: ### Case 1 (no Yarn installed) 1. Ensure `yarn` is not present in PATH 2. Run Xcode build 3. Check that Codegen artifacts are produced ### Case 2 (Yarn v2 is used) 1. Ensure `yarn` is running in the v2 ("Berry") mode 2. Run Xcode build 3. Check that Codegen artifacts are produced Reviewed By: fkgozali Differential Revision: D26187081 Pulled By: hramos fbshipit-source-id: 77d3089f523b8c976d8223b77ff9553cb6cf68a5
- Loading branch information