Initialize the variable before assigning to it with eval
Otherwise https://www.shellcheck.net/ would complain: Line 288: echo "$base_toolbox_command: $variable=$value" >&3 ^-- SC2154: value is referenced but not assigned. See: https://github.com/koalaman/shellcheck/wiki/SC2154 https://github.com/debarshiray/toolbox/pull/83
This commit is contained in:
parent
0877e8ad30
commit
c85df80cbd
1 changed files with 1 additions and 0 deletions
1
toolbox
1
toolbox
|
@ -283,6 +283,7 @@ create_environment_options()
|
||||||
| {
|
| {
|
||||||
environment_options=""
|
environment_options=""
|
||||||
echo "$base_toolbox_command: creating list of environment variables to forward" >&3
|
echo "$base_toolbox_command: creating list of environment variables to forward" >&3
|
||||||
|
value=""
|
||||||
while read -r variable; do
|
while read -r variable; do
|
||||||
eval value="$""$variable"
|
eval value="$""$variable"
|
||||||
echo "$base_toolbox_command: $variable=$value" >&3
|
echo "$base_toolbox_command: $variable=$value" >&3
|
||||||
|
|
Loading…
Reference in a new issue