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() {
|
||||
try {
|
||||
const {stdout: xcodeSelectStdout} = await exec('xcode-select -p');
|
||||
const xcodeCLIVersion = xcodeSelectStdout!.toString().trim();
|
||||
const {stdout: simulatorProcessStdout} = await exec(
|
||||
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 runningSimulatorApplications = simulatorProcessStdout!
|
||||
.toString()
|
||||
.split('\n')
|
||||
|
||||
Reference in New Issue
Block a user