From 226e042e1d9cb6736f8df0d4bb009a5b18f95ac0 Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Mon, 8 Mar 2021 04:57:31 -0800 Subject: [PATCH] Fix the broken xcode detection due to space Summary: Due to the space in the path, `fs.pathExists` returned false even if the path was existent. Thus added `.trim()` to fix it. Reviewed By: passy Differential Revision: D26869404 fbshipit-source-id: 146a96262353177e786f5100a1dad9af7c7d398b --- desktop/app/src/utils/iOSContainerUtility.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/app/src/utils/iOSContainerUtility.tsx b/desktop/app/src/utils/iOSContainerUtility.tsx index 3930a8f15..87d314862 100644 --- a/desktop/app/src/utils/iOSContainerUtility.tsx +++ b/desktop/app/src/utils/iOSContainerUtility.tsx @@ -262,7 +262,7 @@ function wrapWithErrorMessage(p: Promise): Promise { async function isXcodeDetected(): Promise { return exec('xcode-select -p') .then(({stdout}) => { - return fs.pathExists(stdout); + return fs.pathExists(stdout.trim()); }) .catch((_) => false); }