Closed valentinegb closed 1 year ago
Right now I'm just doing this:
#![allow(unused_must_use)]
dotenv();
But I'd rather not have to disable any warnings.
dotenv()
returns Result
. You can handle the error or ignore it.
dotenv().ok(); // discards the error if there is one
Oh- yeah, duh, thanks lol
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?