theory / pgenv

PostgreSQL binary manager
MIT License
311 stars 27 forks source link

Remove `declare` from array definitions. #57

Open fluca1978 opened 2 years ago

fluca1978 commented 2 years ago

declare -a is used for arrays when declare -p dumps the configuration. However when pgenv_configuration_read gets back the configuration, variables becomes locally scoped (see bash -c "help declare"). One solution could be to usedeclare -gto make variables globals, but this does not works on OSX. Removingdeclare -afrom arrays seems to make the variable global even if noEXPORTis issued. As a possible compatibility statement, theEXPORT` after each variable is left in place.

Close #56