mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
Fix version parsing. Now working with command $ zsh --version
This commit is contained in:
parent
ca4dabb45e
commit
bbf1f87ee6
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ require_tool ()
|
|||
envvar_name=$(echo $1 | tr '[:lower:]' '[:upper:]')
|
||||
tool=$(printenv $envvar_name || echo $1)
|
||||
local version=$($tool --version 2>/dev/null| \
|
||||
sed -n 's/.*[^0-9.]\([0-9][0-9.]*\).*/\1/p;q')
|
||||
sed -n 's/.*[^0-9.]\([0-9]*\.[0-9.]*\).*/\1/p;q')
|
||||
if test x"$version" = x ; then
|
||||
echo "$tool is required" >/dev/stderr
|
||||
return 1
|
||||
|
|
Loading…
Reference in a new issue