mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 05:17:11 -07:00
Makes hack for issue #19 a litte more robust.
Refresh the export-free sdkman-init whenever the original has changed.
This commit is contained in:
parent
be5efd6aaf
commit
541a69e192
1 changed files with 6 additions and 3 deletions
|
@ -15,9 +15,12 @@ if not test -f "$__fish_sdkman_init"
|
|||
exit 0
|
||||
end
|
||||
|
||||
# Hack for issue #19: Create version of sdkman-init that doesn't export
|
||||
# any environment variables.
|
||||
if not test -f "$__fish_sdkman_noexport_init"
|
||||
# Hack for issue #19:
|
||||
# Create version of sdkman-init that doesn't export any environment variables.
|
||||
# Refresh if sdkman-init changed.
|
||||
if begin not test -f "$__fish_sdkman_noexport_init";
|
||||
or env test "$__fish_sdkman_init" -nt "$__fish_sdkman_noexport_init"
|
||||
end
|
||||
mkdir -p (dirname $__fish_sdkman_noexport_init)
|
||||
sed -e 's/^\(\s*\).*\(export\|to_path\).*$/\1:/g' "$__fish_sdkman_init" \
|
||||
> $__fish_sdkman_noexport_init
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue