From 911837c48fc6387daa341b3cc5be21b1b1cade57 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Apr 2011 00:30:45 +0200 Subject: [PATCH] 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. --- plugins/github/github.plugin.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh index 8d458065..18fff175 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -1,6 +1,5 @@ -# hub alias from defunkt -# https://github.com/defunkt/hub -if [ "$commands[(I)hub]" ]; then +# Setup hub function for git, if it is available; http://github.com/defunkt/hub +if [ "$commands[(I)hub]" ] && [ "$commands[(I)ruby]" ]; then # eval `hub alias -s zsh` function git(){hub "$@"} fi