Fix sdk env clear

This commit is contained in:
Raphael Reitzig 2021-01-22 00:47:19 +01:00
parent a8a9a17c91
commit 04ecbe7361

View file

@ -42,7 +42,8 @@ function __fish_sdkman_run_in_bash
echo -e \"\$?\" > $pipe; echo -e \"\$?\" > $pipe;
env | grep -e '^SDKMAN_\|^PATH' >> $pipe; env | grep -e '^SDKMAN_\|^PATH' >> $pipe;
env | grep -i -E \"^(`echo \${SDKMAN_CANDIDATES_CSV} | sed 's/,/|/g'`)_HOME\" >> $pipe; env | grep -i -E \"^(`echo \${SDKMAN_CANDIDATES_CSV} | sed 's/,/|/g'`)_HOME\" >> $pipe;
echo \"SDKMAN_OFFLINE_MODE=\${SDKMAN_OFFLINE_MODE}\" >> $pipe" # it's not an environment variable! echo \"SDKMAN_OFFLINE_MODE=\${SDKMAN_OFFLINE_MODE}\" >> $pipe;
echo \"SDKMAN_ENV=\${SDKMAN_ENV}\" >> $pipe" # it's not an environment variable!
set bashDump (cat $pipe; rm $pipe) set bashDump (cat $pipe; rm $pipe)
set sdkStatus $bashDump[1] set sdkStatus $bashDump[1]
@ -65,7 +66,7 @@ function __fish_sdkman_run_in_bash
if test -n value if test -n value
set -gx $var $value set -gx $var $value
# Note: This makes SDKMAN_OFFLINE_MODE an environment variable. # Note: This makes SDKMAN_{OFFLINE_MODE,ENV} environment variables.
# That gives it the behaviour we _want_! # That gives it the behaviour we _want_!
end end
end end