-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
--env-file
watch
#54001
Comments
this should probably be the default, without an extra flag |
I assume that the To test this hypothesis, could you check if you can see new variables in the child process when you add a new entry to |
I just tested this and I can! You're right. |
observe env files in --watch mode through the watcher's filterFile and forward changes to the childProcess Fixes: nodejs#54001
observe env files in `--watch` mode through the watcher's filterFile and forward changes to the childProcess Fixes: nodejs#54001
Make sure we watch and reload on env file changes. Ignore env file in parent process, so child process can reload current vars when we recreate it. Fixes: nodejs#54001
Make sure we watch and reload on env file changes. Ignore env file in parent process, so child process can reload current vars when we recreate it. Fixes: nodejs#54001
Make sure we watch and reload on env file changes. Ignore env file in parent process, so child process can reload current vars when we recreate it. Fixes: nodejs#54001
What is the problem this feature will solve?
We already have
--env-file
and--watch
:$ node --env-file=.env --watch test.js
However, it seems we're missing the ability to watch the env file. The command above will not restart the script when the env file changes.
--watch-path=.env
doesn't help either. It does restart the script when the env file changes, however the env file is not loaded again, so the script only has access to the environment variables that were loaded when the command was first ran.What is the feature you are proposing to solve the problem?
A flag to watch the env file e.g.
--watch-env-file
.What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: