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

Allow env() stren() to take variable value as input #1995

Open
victorwon opened this issue Apr 1, 2024 · 0 comments
Open

Allow env() stren() to take variable value as input #1995

victorwon opened this issue Apr 1, 2024 · 0 comments

Comments

@victorwon
Copy link

Please describe your feature request.
Currently, env() and strenv() use the env VAR name directly to get result, e.g.
myvar=abc yq -n 'env(myvar)'

But it could be even powerful to allow using the value from processing, e.g.
echo "myvar=123" | yq e '.*| strenv(key)'

With the feature suggested it could output 123, but currently it only results in empty output, all because it tries to look up for env VAR(key) instead of env VAR(myvar)

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

No branches or pull requests

1 participant