浏览代码

fixed rvm warning

Menno Pruijssers 10 年之前
父节点
当前提交
aee8877988
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      themes/Soliah.zsh-theme

+ 6 - 5
themes/Soliah.zsh-theme

@@ -32,11 +32,12 @@ function check_git_prompt_info() {
 
 # Determine if we are using a gemset.
 function rvm_gemset() {
-    GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
-    if [[ -n $GEMSET ]]; then
-        echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
-    fi 
-
+    if hash rvm 2>/dev/null; then
+        GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
+        if [[ -n $GEMSET ]]; then
+            echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
+        fi 
+    fi
 }
 
 # Determine the time since last commit. If branch is clean,