From 8696349593c4ec23b0996fa99ce8dc7d9a8fcbc6 Mon Sep 17 00:00:00 2001 From: Liam Jones Date: Thu, 10 Feb 2022 01:47:04 -0800 Subject: [PATCH] Fix Xcode version check (#3428) Summary: Fixes https://github.com/facebook/flipper/issues/3396 - the Xcode version mismatch check has been broken since 0.132.0. ## Changelog Fixed Xcode version mismatch check Pull Request resolved: https://github.com/facebook/flipper/pull/3428 Test Plan: No existing test, manually tested locally on macOS 11.6.3 via `yarn start` when launching the Simulator directly or via `yarn react-native run-ios` in an RN project Reviewed By: lblasa, mweststrate Differential Revision: D34139471 Pulled By: lawrencelomax fbshipit-source-id: 97920de5c463b366ef7ecaef0441ee37debe5d46 --- .../flipper-server-core/src/devices/ios/iOSDeviceManager.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/flipper-server-core/src/devices/ios/iOSDeviceManager.tsx b/desktop/flipper-server-core/src/devices/ios/iOSDeviceManager.tsx index 1fc0a97f8..ee5a73071 100644 --- a/desktop/flipper-server-core/src/devices/ios/iOSDeviceManager.tsx +++ b/desktop/flipper-server-core/src/devices/ios/iOSDeviceManager.tsx @@ -195,7 +195,7 @@ export class IOSDeviceManager { let {stdout: xcodeCLIVersion} = await exec('xcode-select -p'); xcodeCLIVersion = xcodeCLIVersion!.toString().trim(); const {stdout} = await exec( - "pgrep Simulator | xargs ps | grep Simulator.app | awk '{print $NF}'", + "pgrep Simulator | xargs ps -o command | grep -v grep | grep Simulator.app | awk '{print $1}'", ); for (const runningSimulatorApp of stdout!.toString().split('\n')) { if (!runningSimulatorApp) {