Use Promise.all for checking xcode-select and apps in parallel
Summary: These can be batched together rather nicely Reviewed By: lblasa Differential Revision: D34139753 fbshipit-source-id: 7388630dcae34d40308d54f18a37215cf18e5904
This commit is contained in:
committed by
Facebook GitHub Bot
parent
84fac685ac
commit
2a9983b1ef
@@ -192,11 +192,14 @@ export class IOSDeviceManager {
|
|||||||
|
|
||||||
async checkXcodeVersionMismatch() {
|
async checkXcodeVersionMismatch() {
|
||||||
try {
|
try {
|
||||||
const {stdout: xcodeSelectStdout} = await exec('xcode-select -p');
|
const [{stdout: xcodeSelectStdout}, {stdout: simulatorProcessStdout}] =
|
||||||
|
await Promise.all([
|
||||||
|
exec('xcode-select -p'),
|
||||||
|
exec(
|
||||||
|
"pgrep Simulator | xargs ps -o command | grep -v grep | grep Simulator.app | awk '{print $1}'",
|
||||||
|
),
|
||||||
|
]);
|
||||||
const xcodeCLIVersion = xcodeSelectStdout!.toString().trim();
|
const xcodeCLIVersion = xcodeSelectStdout!.toString().trim();
|
||||||
const {stdout: simulatorProcessStdout} = await exec(
|
|
||||||
"pgrep Simulator | xargs ps -o command | grep -v grep | grep Simulator.app | awk '{print $1}'",
|
|
||||||
);
|
|
||||||
const runningSimulatorApplications = simulatorProcessStdout!
|
const runningSimulatorApplications = simulatorProcessStdout!
|
||||||
.toString()
|
.toString()
|
||||||
.split('\n')
|
.split('\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user