Skip to content

Commit

Permalink
[plugins/xcode] Fix opening project using a wrong Xcode version (ohmy…
Browse files Browse the repository at this point in the history
  • Loading branch information
thii authored and mcornella committed Jul 19, 2018
1 parent 626b30b commit 6ca57e0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/xcode/xcode.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ function xc {
fi
return 1
else
echo "Found ${xcode_proj[1]}"
open "${xcode_proj[1]}"
local active_path
active_path=$(xcode-select -p)
active_path=${active_path%%/Contents/Developer*}
echo "Found ${xcode_proj[1]}. Opening with ${active_path}"
open -a "$active_path" "${xcode_proj[1]}"
fi
}

Expand Down

0 comments on commit 6ca57e0

Please sign in to comment.