Skip to content

Commit

Permalink
lib/omb-deprecate: Fix "_omb_deprecate_declare" outputting varname
Browse files Browse the repository at this point in the history
Reported-By: Matt Faucher (@mattfaucher on GitHub)
1dfbd39#commitcomment-130420417
  • Loading branch information
akinomyoga committed Oct 19, 2023
1 parent 07d9382 commit 9b244fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/omb-deprecate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function _omb_deprecate_declare__init {
fi >/dev/tty
fi
if [[ $__new && ! ${!__new+set} ]]; then
printf "$__new" '%s' "${!__old}"
printf -v "$__new" '%s' "${!__old}"
fi
fi
}
Expand Down Expand Up @@ -124,7 +124,7 @@ else
__notify=1
fi

printf "$__old" %s "${!__new-}"
printf -v "$__old" %s "${!__new-}"
if [[ :$__opts: == *:track:* ]]; then
local __index=${#_omb_deprecate_declare[@]}
_omb_deprecate_declare[__index]=track:$__old:$__new:$__msg
Expand Down

0 comments on commit 9b244fe

Please sign in to comment.