fix: Respect globally set SDKMAN_DIR

Also, print a warning during shell startup
if a custom install path is set, but
SDKMAN! is not installed there.

fixes #52
This commit is contained in:
Raphael Reitzig 2024-04-03 23:35:59 +02:00 committed by Raphael
parent 5f2ae91d5f
commit a0aa142288
5 changed files with 43 additions and 25 deletions

View file

@ -64,10 +64,12 @@ def run_fish_command(cmd)
end.to_h
out, status = Open3.capture2e(<<~FISH
#{@command.nil? ? '' : @command}
fish -c '#{cmd} > #{files[:stdout]} 2> #{files[:stderr]}; \
echo $status > #{files[:status]}; \
env > #{files[:env]}; \
'
#{@command.nil? ? '' : ')'}
FISH
)