]> git.tuebingen.mpg.de Git - gsu.git/commit - config
config: Declare local config variables earlier.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Apr 2017 13:27:54 +0000 (15:27 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Apr 2017 14:03:20 +0000 (16:03 +0200)
commitf66a09d3788d11454ac9723dc897188ccbbf9ed1
treec8edea8e6de2bbea415df2f2aa60cdf05a6162ac
parent97803e0d2487ed9553a508257ce78145e60a409a
config: Declare local config variables earlier.

In gsu_check_options() we declare the six option variables (name,
option_type, ...)  local to avoid overwriting the content of
user-defined variables of the same name.

Of course this only works if the variables are declared local before
we assign to them. This is currently not the case because the

eval "${gsu_options[$i]}"

statement in the first loop sets these variables before they are
declared in the body of the second loop.

This bug is benign since gsu_check_options() is usually called before
any command handler is executed. Let's fix it anyway.
config