-
Notifications
You must be signed in to change notification settings - Fork 507
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
Function to get the path for the env file, if one is used #2559
Comments
Edit: never mind - realized using the |
@laniakea64 maybe, that's kind of the opposite of what I'm looking for though. They want to specify the dotenv path as a variable, whereas I want to access the dotenv path (which may be specified by arguments to the |
I think this is probably reasonable to add. I do worry about what happens if we add support for loading multiple dotenv files, in which case the function would only return the first one, but we can cross that bridge when we get to it. |
It is probably also worth considering a generic "get value of setting" function, which would solve my specific use-case, as well as any other use-case where the |
I think it would be useful to have a function that would return the path of the current dotenv file, if one is currently being used. My use case is to pass the currently loaded dotenv file to
docker run --env-file <dotenv path>
. This seems nicer than specifying the dotenv path as an argument to the target, because it will load the expected dotenv file by default, and allow you to override it withjust --dotenv-filename
orjust --dotenv-path
, and the use of docker would be fully abstracted from thejust
user.The text was updated successfully, but these errors were encountered: