You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
How do you make a test that doesn't fail if dotenv() doesn't find the .env file? #62
In my Rust program, I have a .env file for my environmental variables when I run the tests on my computer. However, I also run the tests via a GitHub workflow, where I have a repository secret defined. Currently, these tests all fail in the workflow because there is no .env file present. How should I resolve this?
Activity
valentinegb commentedon Jan 15, 2023
Right now I'm just doing this:
But I'd rather not have to disable any warnings.
allan2 commentedon Jan 15, 2023
dotenv()returnsResult. You can handle the error or ignore it.valentinegb commentedon Jan 15, 2023
Oh- yeah, duh, thanks lol