Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove declare from array definitions. #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fluca1978
Copy link
Collaborator

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 use declare -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

`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 use `declare -g` to make variables
globals, but this does not works on OSX.
Removing `declare -a` from arrays seems to make the variable global
even if no `EXPORT` is issued. As a possible compatibility statement,
the `EXPORT` after each variable is left in place.

Close theory#56
When the configuration is dumped, the `declare -p` produces also the
`-x` flag due to the presence of the explicit `EXPORT`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes in PGENV_INITDB_OPTIONS (config-file) are not applied
1 participant