From 0294cf863e7f5ce2f85df450afe37f1443c00a05 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 9 Feb 2017 13:45:39 -0800 Subject: [PATCH] Improve file/dir existence check for Xcode backend (#8037) --- packages/flutter_tools/bin/xcode_backend.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/flutter_tools/bin/xcode_backend.sh b/packages/flutter_tools/bin/xcode_backend.sh index e4d4fe559d..f88239832e 100755 --- a/packages/flutter_tools/bin/xcode_backend.sh +++ b/packages/flutter_tools/bin/xcode_backend.sh @@ -14,9 +14,12 @@ EchoError() { } AssertExists() { - RunCommand ls $1 - if [ $? -ne 0 ]; then - EchoError "The path $1 does not exist" + if [[ ! -e "$1" ]]; then + if [[ -h "$1" ]]; then + EchoError "The path $1 is a symlink to a path that does not exist" + else + EchoError "The path $1 does not exist" + fi exit -1 fi return 0