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

feat: Add --recursive flag to enable env-var nesting #253

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

Conversation

nkrul
Copy link

@nkrul nkrul commented Mar 10, 2021

Added a command line --recursive option.
This will reprocess the env file to fill in any ${variables} there may be.
eg:

VAL1=Hello
VAL2=${VAL1} There

will resolve VAL2 to Hello There
It's not order dependent, as long as it's in the file
It's all done in a single pass.

Also made $var and ${var} both work
Also fixed a return type bug (process.kill can return a boolean in my version of node)

This has been tested on a real project with a file:/ dependency include;

@nkrul nkrul mentioned this pull request Mar 10, 2021
@nkrul
Copy link
Author

nkrul commented Mar 10, 2021

Look like this matches an existing feature request: #97

@nkrul
Copy link
Author

nkrul commented Mar 10, 2021

Also possibly #122

@GeorgiosP
Copy link

awesome to see this supported out of the box 🎉

@nkrul nkrul changed the title Add --recursive flag to enable env-var nesting feat: Add --recursive flag to enable env-var nesting Mar 11, 2021
@nkrul
Copy link
Author

nkrul commented Mar 24, 2021

@toddbluhm ?

@markovdigital
Copy link

@toddbluhm Hello! It would be great if you could merge it. Variable expansion is essential for most complex projects

@jpdvi
Copy link

jpdvi commented Oct 1, 2021

this would be really useful....

@nkrul
Copy link
Author

nkrul commented Feb 28, 2022

@toddbluhm - back to a project where this would be really useful.

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.

None yet

4 participants