6a830f39b68300cf86504f1c60d9ab77c09b7971
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Return error if no xcode files where found
Diff
1diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh
2index 4aa6bfc9b12431187b7d4d079fefa7129e934c8a..274bd92e434e81b0fbc668a90a53459aebcd58a1 100644
3--- a/plugins/xcode/xcode.plugin.zsh
4+++ b/plugins/xcode/xcode.plugin.zsh
5@@ -2,8 +2,10 @@
6 function xc {
7 local xcode_proj
8 xcode_proj=(*.{xcworkspace,xcodeproj}(N))
9+
10 if [[ ${#xcode_proj} -eq 0 ]]; then
11 echo "No xcworkspace/xcodeproj file found in the current directory."
12+ return 1
13 else
14 echo "Found ${xcode_proj[1]}"
15 open "${xcode_proj[1]}"