Closed reitzig closed 5 years ago
Initialization is similarly affected: conf.d/sdk.fish
currently fills PATH
correctly, but ignores any other effect sdkman_init.sh
might have.
--> Call the bash initialization script during fish startup and capture its effects. We shouldn't even have to call it for every sdk
call then!
Ironically, offline mode is not affected by #19 -- because SDKMAN_OFFLINE_MODE
is not an environment variable, which made the code more awkward.
Expected
Actual
Analysis
The problem is that sdk uses an environment variable (
$SDKMAN_OFFLINE_MODE
, to be precise) to signal offline mode across runs. This environment variable is not captured from the nested bash call to the fish session.Plan
Capture all
$SDKMAN_*
variables, thereby fixing all unknown issues with similar cause. Use the same method as for capuring$PATH
. Add tests.