Skip to content

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