Browse code

github plugin: check for `ruby`.

I've run into the issue where a stripped down container had no Ruby
installed, which caused `hub` to fail.

Therefore I've added an extra check to verify that `ruby` is in the
commands list before setting up this alias/function.

Daniel Hahler authored on 12/04/2011 at 22:30:45
Showing 1 changed files
... ...
@@ -1,6 +1,5 @@
1
-# hub alias from defunkt
2
-# https://github.com/defunkt/hub
3
-if [ "$commands[(I)hub]" ]; then
1
+# Setup hub function for git, if it is available; http://github.com/defunkt/hub
2
+if [ "$commands[(I)hub]" ] && [ "$commands[(I)ruby]" ]; then
4 3
     # eval `hub alias -s zsh`
5 4
     function git(){hub "$@"}
6 5
 fi