Commit dc5fc0b
fix: open Metro in the correct terminal (react-native-community#310)
* Put `isPackagerRunning` function on `cli-tools` to share between iOS & Android
* Fix `terminal` argument not working when not being provided
* Fallback to the default terminal of the machine when starting the packager on `run-android`
* Delete `isPackagerRunning` as it was moved to `tools`
* Add `terminal` argument to `run-ios`
* Launch Metro from within the `runIOS` command
* Remove code & add `—terminal` argument
* Try using `REACT_TERMINAL` before the default terminal
* Put `isPackagerRunning` function on `cli-tools` to share between iOS & Android
* Fix `terminal` argument not working when not being provided
* Fallback to the default terminal of the machine when starting the packager on `run-android`
* Delete `isPackagerRunning` as it was moved to `tools`
* Add `terminal` argument to `run-ios`
* Launch Metro from within the `runIOS` command
* Remove code & add `—terminal` argument
* Try using `REACT_TERMINAL` before the default terminal
* Add tool function to get the default user terminal
* Fix `terminal` arg type
* Remove spread and specify entry twice instead
* Improve `args` being passed through functions
* Reduce code duplication
* Put `device` and `udid` variable up in the scope1 parent 4a81f23 commit dc5fc0b
File tree
5 files changed
+60
-95
lines changed- packages
- platform-android/src/commands/runAndroid
- platform-ios/src/commands/runIOS
- tools/src
5 files changed
+60
-95
lines changedLines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 232 | + | |
234 | 233 | | |
235 | 234 | | |
236 | 235 | | |
| |||
359 | 358 | | |
360 | 359 | | |
361 | 360 | | |
362 | | - | |
| 361 | + | |
363 | 362 | | |
364 | 363 | | |
365 | 364 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | | - | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | | - | |
70 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
71 | 81 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 82 | + | |
81 | 83 | | |
| 84 | + | |
82 | 85 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 96 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 97 | + | |
116 | 98 | | |
117 | 99 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 100 | + | |
125 | 101 | | |
126 | 102 | | |
127 | | - | |
| 103 | + | |
128 | 104 | | |
129 | 105 | | |
130 | 106 | | |
| |||
175 | 151 | | |
176 | 152 | | |
177 | 153 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 154 | + | |
182 | 155 | | |
183 | 156 | | |
184 | 157 | | |
| |||
213 | 186 | | |
214 | 187 | | |
215 | 188 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 189 | + | |
225 | 190 | | |
226 | 191 | | |
227 | 192 | | |
228 | 193 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 194 | + | |
233 | 195 | | |
234 | 196 | | |
235 | 197 | | |
236 | 198 | | |
237 | | - | |
| 199 | + | |
238 | 200 | | |
239 | 201 | | |
240 | 202 | | |
241 | 203 | | |
242 | 204 | | |
243 | | - | |
| 205 | + | |
244 | 206 | | |
245 | 207 | | |
246 | 208 | | |
| |||
257 | 219 | | |
258 | 220 | | |
259 | 221 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
| 222 | + | |
269 | 223 | | |
270 | 224 | | |
271 | 225 | | |
272 | 226 | | |
273 | 227 | | |
274 | | - | |
| 228 | + | |
275 | 229 | | |
276 | 230 | | |
277 | 231 | | |
| |||
281 | 235 | | |
282 | 236 | | |
283 | 237 | | |
284 | | - | |
| 238 | + | |
285 | 239 | | |
286 | 240 | | |
287 | 241 | | |
| |||
291 | 245 | | |
292 | 246 | | |
293 | 247 | | |
294 | | - | |
| 248 | + | |
295 | 249 | | |
296 | 250 | | |
297 | 251 | | |
| |||
418 | 372 | | |
419 | 373 | | |
420 | 374 | | |
421 | | - | |
422 | | - | |
| 375 | + | |
| 376 | + | |
423 | 377 | | |
424 | | - | |
| 378 | + | |
425 | 379 | | |
426 | 380 | | |
427 | 381 | | |
428 | 382 | | |
429 | | - | |
| 383 | + | |
430 | 384 | | |
431 | 385 | | |
432 | 386 | | |
| |||
499 | 453 | | |
500 | 454 | | |
501 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
502 | 462 | | |
503 | 463 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
0 commit comments