Commit 07e4953
Invoke
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: 77d3089f523b8c976d8223b77ff9553cb6cf68a5node directly in generate-specs.sh (#30781)1 parent a74347e commit 07e4953
1 file changed
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
0 commit comments