Skip to content

Commit

Permalink
Declare var as 'local' fix for #95
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaloras committed Aug 3, 2019
1 parent 9811ba8 commit 2dca19c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bash-preexec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ __bp_inside_preexec=0
# Fails if any of the given variables are readonly
# Reference https://stackoverflow.com/a/4441178
__bp_require_not_readonly() {
local var
for var; do
if ! ( unset "$var" 2> /dev/null ); then
echo "bash-preexec requires write access to ${var}" >&2
Expand Down

0 comments on commit 2dca19c

Please sign in to comment.