mirror of
https://github.com/ivuorinen/phpenv.fish.git
synced 2026-03-12 17:01:36 +00:00
fix: add Linuxbrew Cellar path detection and fix variable checking syntax (#82)
add detecting cellar when using linux homebrew
This commit is contained in:
@@ -224,6 +224,8 @@ function __phpenv_get_cellar_path
|
|||||||
set -g __phpenv_cellar_cache /opt/homebrew/Cellar
|
set -g __phpenv_cellar_cache /opt/homebrew/Cellar
|
||||||
else if test -d /usr/local/Cellar
|
else if test -d /usr/local/Cellar
|
||||||
set -g __phpenv_cellar_cache /usr/local/Cellar
|
set -g __phpenv_cellar_cache /usr/local/Cellar
|
||||||
|
else if test -d /home/linuxbrew/.linuxbrew/Cellar
|
||||||
|
set -g __phpenv_cellar_cache /home/linuxbrew/.linuxbrew/Cellar
|
||||||
else
|
else
|
||||||
set -g __phpenv_cellar_cache ""
|
set -g __phpenv_cellar_cache ""
|
||||||
end
|
end
|
||||||
@@ -714,7 +716,7 @@ function __phpenv_config_get -a phpenv_key
|
|||||||
set -l phpenv_source
|
set -l phpenv_source
|
||||||
|
|
||||||
# Check if environment variable is set
|
# Check if environment variable is set
|
||||||
if test -n "$phpenv_env_var" -a (set -q $phpenv_env_var)
|
if test -n "$phpenv_env_var"; and set -q $phpenv_env_var
|
||||||
set phpenv_value (eval echo \$$phpenv_env_var)
|
set phpenv_value (eval echo \$$phpenv_env_var)
|
||||||
set phpenv_source "fish universal variable"
|
set phpenv_source "fish universal variable"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user