mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 05:17:11 -07:00
Preserve all X_HOME environment variables created by SDKMAN!.
Adresses issue #24.
This commit is contained in:
parent
9dd152bced
commit
85d10acc47
2 changed files with 10 additions and 3 deletions
|
@ -23,14 +23,20 @@ echo "Testing the sdk wrapper"
|
|||
set failures 0
|
||||
for sdk_cmd in $test_commands
|
||||
echo " Testing '$sdk_cmd'"
|
||||
bash -c "source \"$sdk_init\" && $sdk_cmd > sout_bash; echo \"\$?\" > status_bash; echo "\$PATH" > path_bash"
|
||||
fish -c "$sdk_cmd > sout_fish; echo \"\$status\" > status_fish; echo "\$PATH" > path_fish"
|
||||
bash -c "source \"$sdk_init\" && $sdk_cmd > sout_bash;
|
||||
echo \"\$?\" > status_bash;
|
||||
echo \"\$PATH\" > path_bash;
|
||||
echo \"\$ANT_HOME\" > anthome_bash"
|
||||
fish -c "$sdk_cmd > sout_fish;
|
||||
echo \"\$status\" > status_fish;
|
||||
echo \"\$PATH\" > path_fish;
|
||||
echo \"\$ANT_HOME\" > anthome_fish"
|
||||
|
||||
# For nicer diffs: one entry per line, sorted
|
||||
string split ":" (cat path_bash) | sort > path_bash
|
||||
string split " " (cat path_fish) | sort > path_fish
|
||||
|
||||
for out in sout status path
|
||||
for out in sout status path anthome
|
||||
if [ (checksum "$out"_bash) != (checksum "$out"_fish) ]
|
||||
echo " - $out bad:"
|
||||
diff "$out"_bash "$out"_fish | sed -e 's/^/ /'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue