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

Nested environment variables are being lowercased (regression?) #356

Open
tzellman opened this issue Feb 22, 2021 · 1 comment
Open

Nested environment variables are being lowercased (regression?) #356

tzellman opened this issue Feb 22, 2021 · 1 comment
Labels

Comments

@tzellman
Copy link

In v15.4.1, when passing in nested environment variables, the case of the nested fields would remain how they were defined.

e.g.

const argv = yargs.env('CONFIG')....

and defining an environment variable like CONFIG_some__nested__camelCase__id=foo.

In v15.4.1 this would parse as {some: {nested: {camelCase: {id: 'foo'}}}}

In the latest 16.2 release, I am seeing: {some: {nested: {camelcase: {id: 'foo'}}}}

Note the camelCase field is now lowercased.

I can provide a repro example, but wanted to get the issue out here, in case this was already known (either as a regression or as new behavior). Thanks!

@bcoe bcoe transferred this issue from yargs/yargs Feb 22, 2021
@bcoe bcoe added the bug label Feb 22, 2021
@bcoe
Copy link
Member

bcoe commented Feb 22, 2021

@tzellman could you provide a failing test case in this repository? there have been a few bug fixes around camel case expansion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants