diff --git a/ble.pp b/ble.pp index 703cd486..74eab39f 100644 --- a/ble.pp +++ b/ble.pp @@ -859,7 +859,6 @@ function ble/init/clean-up { ble/base/restore-builtin-wrappers builtin eval -- "$_ble_bash_FUNCNEST_restore" fi - builtin unset -v _ble_bash return "$ext" } @@ -1006,6 +1005,7 @@ function ble/base/read-blesh-arguments { if ! ble/base/read-blesh-arguments "$@"; then builtin echo "ble.sh: cancel initialization." >&2 ble/init/clean-up 2>/dev/null # set -x 対策 #D0930 + builtin unset -v _ble_bash return 2 2>/dev/null || builtin exit 2 fi @@ -1014,6 +1014,7 @@ function ble/base/read-blesh-arguments { if ! ble/base/unload-for-reload; then builtin echo "ble.sh: an old version of ble.sh seems to be already loaded." >&2 ble/init/clean-up 2>/dev/null # set -x 対策 #D0930 + builtin unset -v _ble_bash return 1 2>/dev/null || builtin exit 1 fi fi diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 1d7afd90..df51d9dd 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -117,6 +117,7 @@ - edit: fix standard streams in `EXIT` trap with `ble/widget/exit` `#D2217` 89f0dab8 - util(`ble/fd#cloexec`): check `fdflags` compatibility to avoid crash `#D2227` c3b3aaf8 - util(`ble/function#evaldef`): suppress alias expansions (reported by 103sbavert) `#D2240` 51e762fe + - main: fix a bug that `_ble_bash` is missing (reported by tessus) `#D2242` xxxxxxxx ## Compatibility diff --git a/note.txt b/note.txt index 20a686fa..2e8da591 100644 --- a/note.txt +++ b/note.txt @@ -7394,6 +7394,15 @@ bash_tips 2024-07-29 + * BUG main: _ble_bash が消失している (reported by tessus) [#D2242] + https://github.com/akinomyoga/ble.sh/issues/470#issuecomment-2255357001 + Ref. #D2240 + + これは #D2240 の regression. _ble_bash の位置を前方に移動した時に builtin + unset -v _ble_bash を途中失敗に付加したが、全体で実行する ble/init/clean-up + にも付加していた事によって全体で _ble_bash が unset される様になってしまっ + ていた。これは問題だ。急いで修正する。 + * main: --clear-cache で長々しい devel version では遅い warning を出力する必要はあるのか [#D2241] Ref. #D2222