3db22634a1dfe6797b2dafabce82b27f101c8e6b

Author
Thomas Minor <tminor@tminor-dt.nvidia.com>
Committer
Thomas Minor <tminor@tminor-dt.nvidia.com>
Date

Message

pipe git version check error to /dev/null (for when git doesn't exist)

Diff

 1diff --git a/lib/git.zsh b/lib/git.zsh
 2index 3e14695bd389f01265d8dcf90587a74f4767030c..bcd6cc0552ab601a4cb91dad871cd60ad18ee79e 100644
 3--- a/lib/git.zsh
 4+++ b/lib/git.zsh
 5@@ -112,7 +112,7 @@ function git_compare_version() {
 6   local INPUT_GIT_VERSION=$1;
 7   local INSTALLED_GIT_VERSION
 8   INPUT_GIT_VERSION=(${(s/./)INPUT_GIT_VERSION});
 9-  INSTALLED_GIT_VERSION=($(git --version));
10+  INSTALLED_GIT_VERSION=($(git --version 2>/dev/null));
11   INSTALLED_GIT_VERSION=(${(s/./)INSTALLED_GIT_VERSION[3]});
12 
13   for i in {1..3}; do