mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
Fix version parsing. Now working with command $ zsh --version
This commit is contained in:
parent
ca4dabb45e
commit
bbf1f87ee6
@ -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 New Issue
Block a user