From 6a830f39b68300cf86504f1c60d9ab77c09b7971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 4 Sep 2015 01:43:48 +0200 Subject: [PATCH] Return error if no xcode files where found --- plugins/xcode/xcode.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 4aa6bfc9b..274bd92e4 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -2,8 +2,10 @@ function xc { local xcode_proj xcode_proj=(*.{xcworkspace,xcodeproj}(N)) + if [[ ${#xcode_proj} -eq 0 ]]; then echo "No xcworkspace/xcodeproj file found in the current directory." + return 1 else echo "Found ${xcode_proj[1]}" open "${xcode_proj[1]}"