Open guimaluf opened 2 years ago
@guimaluf thanks for the patch; just have a query/comment on whether the scripts should actually have a #!
header.
@ajkavanagh
adding the shebang to the sourced file doesn't work because if we want source novarc
to affect the current environment, since running it in a subshell will not affect the current environment variables.
FTR the way to reproduce the issue above.
$ source novarc
$ source novarc ✹ ✭
novarc:unset:6: OS_USERNAME OS_PASSWORD OS_TENANT_NAME OS_REGION_NAME OS_AUTH_URL OS_AUTH_TYPE: invalid parameter name
@ajkavanagh adding the shebang to the sourced file doesn't work because if we want
source novarc
to affect the current environment, since running it in a subshell will not affect the current environment variables.FTR the way to reproduce the issue above.
$ source novarc $ source novarc ✹ ✭ novarc:unset:6: OS_USERNAME OS_PASSWORD OS_TENANT_NAME OS_REGION_NAME OS_AUTH_URL OS_AUTH_TYPE: invalid parameter name
ah, I forgot they were sourced. That's annoying. I guess we'll just have to switch to formal arrays. Thanks for the patch.
ZHS doesn't deal properly with the space-delimited array of _OS_PARAMS when sourcing novarc*.
This commit encloses the array so it will work fine in both bash and zsh environments.