Skip to content

Commit

Permalink
main: fix a bug of missing "_ble_bash"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jul 29, 2024
1 parent 0bc8610 commit bb2dae6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ble.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions note.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit bb2dae6

Please sign in to comment.