Minor edge case: If a library/function is loaded, and then manually unset, then _is_lib_loaded() is going to be tricked into believing that the function is still loaded.
Steps to reproduce:
Well... you should really get your parents to give you 'the talk' ;)
Steps to make this thing blow up for you too:
import text/str_altcaps.sh
unset str_altcaps
import str_altcaps from text
Step 3 invokes _is_lib_loaded() which checks SH_LIBS_LOADED, rather than the environment, it thinks that str_altcaps is loaded, so it hits return 0. At the time of logging this issue, import x from y is broken, so I'd expect to see SH_STACK dumped out.
This is obviously more of an issue for interactive usage rather than scripted usage, hence its "minor" status.
Minor edge case: If a library/function is loaded, and then manually
unset
, then_is_lib_loaded()
is going to be tricked into believing that the function is still loaded.Steps to reproduce: Well... you should really get your parents to give you 'the talk' ;)
Steps to make this thing blow up for you too:
import text/str_altcaps.sh
unset str_altcaps
import str_altcaps from text
Step 3 invokes
_is_lib_loaded()
which checksSH_LIBS_LOADED
, rather than the environment, it thinks thatstr_altcaps
is loaded, so it hitsreturn 0
. At the time of logging this issue,import x from y
is broken, so I'd expect to seeSH_STACK
dumped out.This is obviously more of an issue for interactive usage rather than scripted usage, hence its "minor" status.